Package com.spotify.logging
Enum LoggingConfigurator.ReplaceNewLines
- java.lang.Object
-
- java.lang.Enum<LoggingConfigurator.ReplaceNewLines>
-
- com.spotify.logging.LoggingConfigurator.ReplaceNewLines
-
- All Implemented Interfaces:
Serializable
,Comparable<LoggingConfigurator.ReplaceNewLines>
- Enclosing class:
- LoggingConfigurator
public static enum LoggingConfigurator.ReplaceNewLines extends Enum<LoggingConfigurator.ReplaceNewLines>
Defines if new lines should be replaced in the logged message to avoid potential CRLF injection. See https://find-sec-bugs.github.io/bugs.htm#CRLF_INJECTION_LOGS
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getMsgPattern(LoggingConfigurator.ReplaceNewLines replaceNewLines)
static LoggingConfigurator.ReplaceNewLines
valueOf(String name)
Returns the enum constant of this type with the specified name.static LoggingConfigurator.ReplaceNewLines[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OFF
public static final LoggingConfigurator.ReplaceNewLines OFF
-
ON
public static final LoggingConfigurator.ReplaceNewLines ON
-
-
Method Detail
-
values
public static LoggingConfigurator.ReplaceNewLines[] 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 (LoggingConfigurator.ReplaceNewLines c : LoggingConfigurator.ReplaceNewLines.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LoggingConfigurator.ReplaceNewLines 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
-
getMsgPattern
public static String getMsgPattern(LoggingConfigurator.ReplaceNewLines replaceNewLines)
-
-