Enum ConsoleTarget
- java.lang.Object
-
- java.lang.Enum<ConsoleTarget>
-
- org.arakhne.afc.bootique.log4j.configs.ConsoleTarget
-
- All Implemented Interfaces:
Serializable
,Comparable<ConsoleTarget>
public enum ConsoleTarget extends Enum<ConsoleTarget>
The target on the console.- Since:
- 15.0
- Version:
- 17.0 2020-01-04 14:41:57
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.bootique
- Maven Artifact Id:
- bootique-log4j
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
toJsonString()
Replies the preferred string representation of the console target within a Json stream.abstract String
toLog4j()
Replies the log4j representation of the target.static ConsoleTarget
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConsoleTarget
valueOfCaseInsensitive(String name)
Parse a case insensitive string for obtaining the console target.static ConsoleTarget[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STDOUT
public static final ConsoleTarget STDOUT
Standard output.
-
STDERR
public static final ConsoleTarget STDERR
Standard error.
-
-
Method Detail
-
values
public static ConsoleTarget[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConsoleTarget c : ConsoleTarget.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConsoleTarget valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toLog4j
public abstract String toLog4j()
Replies the log4j representation of the target.- Returns:
- the target representation.
-
valueOfCaseInsensitive
public static ConsoleTarget valueOfCaseInsensitive(String name)
Parse a case insensitive string for obtaining the console target.- Parameters:
name
- the name to parse.- Returns:
- the console target.
- Since:
- 16.0
-
toJsonString
public String toJsonString()
Replies the preferred string representation of the console target within a Json stream.- Returns:
- the string representation of the console target.
- Since:
- 16.0
-
-