Class TreeLogger.Type

public static class TreeLogger.Type
extends Object
A type-safe enum of all possible logging severity types.

Methods

getLabel()Gets the label for this severity type.
instances()Gets all the possible severity types as an array.
isLowerPriorityThan(TreeLogger.Type)Determines whether this log type is of lower priority than some other log type.
needsAttention()Indicates whether this severity type represents a high severity that should be highlighted for the user.
toString()
valueOf(String)Looks up a severity type by label.

Method Detail

getLabel

public String getLabel()
Gets the label for this severity type.

Return Value

the label

instances

public static TreeLogger.Type[] instances()
Gets all the possible severity types as an array.

Return Value

an array of severity types

isLowerPriorityThan

public boolean isLowerPriorityThan(TreeLogger.Type other)
Determines whether this log type is of lower priority than some other log type.

Parameters

other
the other log type

Return Value

true if this log type is lower priority

needsAttention

public boolean needsAttention()
Indicates whether this severity type represents a high severity that should be highlighted for the user.

Return Value

true if this severity is high, otherwise false.

toString

public String toString()

valueOf

public static TreeLogger.Type valueOf(String label)
Looks up a severity type by label.

Parameters

label
the label of the desired severity

Return Value

the severity type labelled label, or null if no such type exists