This is still a work in progress. Please feel free to edit any mistakes you find
.
Handlers are used to determine what happens with a log message if the logger determines the message is loggable.
There are 6 main handlers provided with WildFly and 1 generic handler;
An async-handler is a handler that asynchronously writes log messages to it's child handlers. This type of handler is generally used for other handlers that take a substantial time to write logged messages.
A console-handler is a handler that writes log messages to the console. Generally this writes to stdout, but can be set to write to stderr.
A file-handler is a handler that writes log messages to the specified file.
A periodic-rotating-file-handler is a handler that writes log messages to the specified file. The file rotates on the date pattern specified in the suffix attribute. The suffix must be a valid pattern recognized by the java.text.SimpleDateFormat and must not rotate on seconds or milliseconds.
The rotate happens before the next message is written by the handler.
A size-rotating-file-handler is a handler that writes log messages to the specified file. The file rotates when the file size is greater than the rotate-size attribute. The rotated file will be kept and the index appended to the name moving previously rotated file indexes up by 1 until the max-backup-index is reached. Once the max-backup-index is reached, the indexed files will be overwritten.
The rotate happens before the next message is written by the handler.
A syslog-handler is a handler that writes to a syslog server. The handler support RFC3164 or RFC5424 formats.
The syslog-handler is missing some configuration properties that may be useful in some scenarios like setting a formatter. Use the org.jboss.logmanager.handlers.SyslogHandler in module org.jboss.logmanager as a custom-handler to exploit these benefits. Additional attributes will be added at some point so this will no longer be necessary.
Description: |
Indicates whether a flush should happen after each write. |
Type: |
boolean |
Default Value: |
true |
Allowed Values: |
true or false |
Description: |
If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages. |
Type: |
boolean |
Default Value: |
true |
Allowed Values: |
true or false |
Description: |
The character encoding used by this Handler. |
Type: |
string |
Default Value: |
null |
Allowed Values: |
Any valid encoding |
Description: |
An object describing the file the handler should write to. |
Type: |
object |
Default Value: |
null |
Allowed Values: |
An object optionally containing a relative-to property and a path. The path is a required property of the object. |
Description: |
The name of a defined formatter to be used on the handler. |
Type: |
string |
Default Value: |
null |
Allowed Values: |
TODO add link |
Description: |
Defines a pattern for a pattern formatter. |
Type: |
string |
Default Value: |
%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n |
Allowed Values: |
TODO add link |
Description: |
A filter expression value to define a filter. |
Type: |
string |
Default Value: |
null |
Allowed Values: |
Description : |
The log level specifying which message levels will be logged by this logger. Message levels lower than this value will be discarded. |
Type: |
string |
Default Value: |
ALL |
Allowed Values: |
|
Description: |
The maximum number of rotated files to keep. |
Type: |
integer |
Default Value: |
1 |
Allowed Values: |
any integer greater than 0 |
Description: |
Specify what action to take when the overflowing. |
Type: |
string |
Default Value: |
BLOCK |
Allowed Values: |
BLOCK or DISCARD |
Description: |
The queue length to use before flushing writing |
Type: |
integer |
Default Value: |
0 |
Allowed Values: |
any positive integer |
Description: |
Indicates whether or not the file should be rotated each time the file attribute is changed. If set to true will rotate on each boot of the server. |
Type: |
boolean |
Default Value: |
false |
Allowed Values: |
true or false |
Description: |
The size at which the file should be rotated. |
Type: |
string |
Default Value: |
2m |
Allowed Values: |
Any positive integer with a size type appended to the end. Valid types are b for bytes, k for kilobytes, m for megabytes, g for gigabytes or t for terabytes. Type character is not case sensitive. |
Description: |
The handlers to associate with the async handler |
Type: |
list of strings |
Default Value: |
null |
Allowed Values: |
An array of valid handler names |
Description: |
The pattern used to determine when the file should be rotated. |
Type: |
string |
Default Value: |
null |
Allowed Values: |
Any valid java.text.SimpleDateFormat pattern. |
Description: |
Defines the target of the console handler. |
Type: |
string |
Default Value: |
System.out |
Allowed Values: |
System.out or System.err |