Enum LayoutType
- java.lang.Object
-
- java.lang.Enum<LayoutType>
-
- org.arakhne.afc.bootique.log4j.configs.LayoutType
-
- All Implemented Interfaces:
Serializable
,Comparable<LayoutType>
public enum LayoutType extends Enum<LayoutType>
The type of logger layout.- 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 abstract org.apache.log4j.Layout
createLayout(String defaultLogFormat)
Create a layout.String
toJsonString()
Replies the preferred string representation of the layout type within a Json stream.static LayoutType
valueOf(String name)
Returns the enum constant of this type with the specified name.static LayoutType
valueOfCaseInsensitive(String name)
Parse a case insensitive string for obtaining the layout type.static LayoutType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SIMPLE
public static final LayoutType SIMPLE
Simple layout.- See Also:
SimpleLayout
-
PATTERN
public static final LayoutType PATTERN
Pattern layout.- See Also:
PatternLayout
-
DATE
public static final LayoutType DATE
Date layout.- See Also:
TTCCLayout
-
HTML
public static final LayoutType HTML
HTML layout.- See Also:
HTMLLayout
-
XML
public static final LayoutType XML
XML layout.- See Also:
XMLLayout
-
-
Method Detail
-
values
public static LayoutType[] 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 (LayoutType c : LayoutType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LayoutType 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
-
createLayout
public abstract org.apache.log4j.Layout createLayout(String defaultLogFormat)
Create a layout.- Parameters:
defaultLogFormat
- the default log format.- Returns:
- the layout.
-
valueOfCaseInsensitive
public static LayoutType valueOfCaseInsensitive(String name)
Parse a case insensitive string for obtaining the layout type.- Parameters:
name
- the name to parse.- Returns:
- the layout type.
- Since:
- 16.0
-
toJsonString
public String toJsonString()
Replies the preferred string representation of the layout type within a Json stream.- Returns:
- the string representation of the layout type.
- Since:
- 16.0
-
-