Enum AccessLogger.LogFormat
- java.lang.Object
-
- java.lang.Enum<AccessLogger.LogFormat>
-
- com.github.fmjsjx.libnetty.http.server.middleware.AccessLogger.LogFormat
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AccessLogger.LogFormat>
- Enclosing class:
- AccessLogger
public static enum AccessLogger.LogFormat extends java.lang.Enum<AccessLogger.LogFormat>
Some pre-defined log formats.- Since:
- 1.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASICBasic log output.BASIC2Another basic log output, make result length human readable.COMBINEDStandard Apache combined log output.COMMONStandard Apache common log output.DEVConcise output colored by response status for development use.SHORTShorter than default, also including response time.TINYThe minimal output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()static AccessLogger.LogFormatvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AccessLogger.LogFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TINY
public static final AccessLogger.LogFormat TINY
The minimal output.:method :path :status :result-length - :response-time ms
-
SHORT
public static final AccessLogger.LogFormat SHORT
Shorter than default, also including response time.:remote-addr :remote-user :method :path :http-version :status :result-length - :response-time ms
-
DEV
public static final AccessLogger.LogFormat DEV
Concise output colored by response status for development use. The :status token will be colored green for success codes, red for server error codes, yellow for client error codes, cyan for redirection codes, and uncolored for information codes.:method :path :status :response-time ms - :result-length
-
COMMON
public static final AccessLogger.LogFormat COMMON
Standard Apache common log output.:remote-addr - :remote-user [:datetime] \":method :path :http-version\" :status :result-length
-
COMBINED
public static final AccessLogger.LogFormat COMBINED
Standard Apache combined log output.:remote-addr - :remote-user [:datetime] ":method :path :http-version" :status :result-length ":referrer" ":user-agent"
-
BASIC
public static final AccessLogger.LogFormat BASIC
Basic log output.:datetime :method :path :http-version :remote-addr - :status :response-time ms :result-length
-
BASIC2
public static final AccessLogger.LogFormat BASIC2
Another basic log output, make result length human readable.:datetime :method :path :http-version :remote-addr - :status :response-time ms :result-length-humanreadable
-
-
Method Detail
-
values
public static AccessLogger.LogFormat[] 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 (AccessLogger.LogFormat c : AccessLogger.LogFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AccessLogger.LogFormat valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<AccessLogger.LogFormat>
-
-