12.6. Logging Configuration Properties

12.6.1. Root Logger Properties

Table 12.6. Root Logger Properties

Property Datatype Description
level String
The maximum level of log message that the root logger records.
handlers String[]
A list of log handlers that are used by the root logger.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that excludes log entries that do not match a pattern: not(match("JBAS.*"))

Note

A filter-spec specified for the root logger is not inherited by other handlers. Instead a filter-spec must be specified per handler.

12.6.2. Log Category Properties

Table 12.7. Log Category Properties

Property Datatype Description
level String
The maximum level of log message that the log category records.
handlers String[]
A list of log handlers associated with the logger.
use-parent-handlers Boolean
If set to true, this category will use the log handlers of the root logger in addition to any other assigned handlers.
category String
The log category from which log messages will be captured.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that does not match a pattern: not(match("JBAS.*"))

12.6.3. Console Log Handler Properties

Table 12.8. Console Log Handler Properties

Property Datatype Description
level String
The maximum level of log message the log handler records.
encoding String
The character encoding scheme to be used for the output.
formatter String
The log formatter used by this log handler.
named-formatter String
The name of the defined formatter to be used on the handler.
target String
The system output stream where the output of the log handler goes. This can be System.err or System.out for the system error stream or standard out stream respectively.
autoflush Boolean
If set to true the log messages will be sent to the handlers target immediately upon receipt.
name String
The unique identifier for this log handler.
enabled Boolean
If set to true, the handler is enabled and functioning as normal. If set to false, the handler is ignored when processing log messages.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that does not match a pattern: not(match("JBAS.*"))

12.6.4. File Log Handler Properties

Table 12.9. File Log Handler Properties

Property Datatype Description
level String
The maximum level of log message the log handler records.
encoding String
The character encoding scheme to be used for the output.
formatter String
The log formatter used by this log handler.
named-formatter String
The name of the defined formatter to be used on the handler.
append Boolean
If set to true then all messages written by this handler will be appended to the file if it already exists. If set to false a new file will be created each time the application server launches. Changes to append require a server reboot to take effect.
autoflush Boolean
If set to true the log messages will be sent to the handlers assigned file immediately upon receipt.
name String
The unique identifier for this log handler.
file Object
The object that represents the file where the output of this log handler is written to. It has two configuration properties, relative-to and path.
relative-to String
This is a property of the file object and is the directory where the log file is written to. JBoss EAP 6 file path variables can be specified here. The jboss.server.log.dir variable points to the log/ directory of the server.
path String
This is a property of the file object and is the name of the file where the log messages will be written. It is a relative path name that is appended to the value of the relative-to property to determine the complete path.
enabled Boolean
If set to true, the handler is enabled and functioning as normal. If set to false, the handler is ignored when processing log messages.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that does not match a pattern: not(match("JBAS.*"))

12.6.5. Periodic Log Handler Properties

Table 12.10. Periodic Log Handler Properties

Property Datatype Description
append Boolean
If set to true then all messages written by this handler will be appended to the file if it already exists. If set to false a new file will be created each time the application server launches. Changes to append require a server reboot to take effect.
autoflush Boolean
If set to true the log messages will be sent to the handlers assigned file immediately upon receipt.
encoding String
The character encoding scheme to be used for the output.
formatter String
The log formatter used by this log handler.
named-formatter String
The name of the defined formatter to be used on the handler.
level String
The maximum level of log message the log handler records.
name String
The unique identifier for this log handler.
file Object
Object that represents the file to which the output of this log handler is written. It has two configuration properties, relative-to and path.
relative-to String
This is a property of the file object and is the directory containing the log file. File path variables can be specified here. The jboss.server.log.dir variable points to the log/ directory of the server.
path String
This is a property of the file object and is the name of the file where the log messages will be written. It is a relative path name that is appended to the value of the relative-to property to determine the complete path.
suffix String
This String is appended to the filename of the rotated logs and is used to determine the frequency of rotation. The format of the suffix is a dot (.) followed by a date String which is able to be parsed by the SimpleDateFormat class. The log is rotated on the basis of the smallest time unit defined by the suffix. Note that the smallest time unit allowed in the suffix attribute is minutes.
For example, a suffix value of .YYYY-MM-dd will result in daily log rotation. Assuming a log file named server.log and a suffix value of .YYYY-MM-dd, the log file rotated on 20 October 2014 would be named server.log.2014-10-19. For a periodic log handler, the suffix includes the previous value for the smallest time unit. In this example the value for dd is 19, the previous day.
enabled Boolean
If set to true, the handler is enabled and functioning as normal. If set to false, the handler is ignored when processing log messages.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that does not match a pattern: not(match("JBAS.*")).

12.6.6. Size Log Handler Properties

Table 12.11. Size Log Handler Properties

Property Datatype Description
append Boolean
If set to true then all messages written by this handler will be appended to the file if it already exists. If set to false a new file will be created each time the application server launches. Changes to append require a server reboot to take effect.
autoflush Boolean
If set to true the log messages will be sent to the handlers assigned file immediately upon receipt.
encoding String
The character encoding scheme to be used for the output.
formatter String
The log formatter used by this log handler.
named-formatter String
The name of the defined formatter to be used on the handler.
level String
The maximum level of log message the log handler records.
name String
The unique identifier for this log handler.
file Object
Object that represents the file where the output of this log handler is written to. It has two configuration properties, relative-to and path.
relative-to String
This is a property of the file object and is the directory containing the log file. File path variables can be specified here. The jboss.server.log.dir variable points to the log/ directory of the server.
path String
This is a property of the file object and is the name of the file where the log messages will be written. It is a relative path name that is appended to the value of the relative-to property to determine the complete path.
rotate-size Integer
The maximum size that the log file can reach before it is rotated. A single character appended to the number indicates the size units: b for bytes, k for kilobytes, m for megabytes, g for gigabytes. Eg. 50m for 50 megabytes.
max-backup-index Integer
The maximum number of rotated logs that are kept. When this number is reached, the oldest log is reused. Default: 1.
Available from JBoss EAP 6.4. If the suffix attribute is used, the suffix of rotated log files is included in the rotation algorithm. When the log file is rotated, the oldest file whose name starts with name+suffix is deleted, the remaining rotated log files have their numeric suffix incremented and the newly rotated log file is given the numeric suffix 1.
Assume a log file name server.log, a suffix value of .YYYY-mm, and max-backup-index value of 3. When the log file has been rotated twice, log file names could be server.log, server.log.2014-10.1 and server.log.2014-10.2. The next time the log file is rotated, server.log.2014-10.2 is deleted, server.log.2014-10.1 is renamed server.log.2014-10.2 and the newly rotated log file is named server.log.2014-10.1.
enabled Boolean
If set to true, the handler is enabled and functioning as normal. If set to false, the handler is ignored when processing log messages.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that does not match a pattern: not(match("JBAS.*"))
rotate-on-boot Boolean
If set to true, a new log file will be created on server restart. Default is false.
suffix String
Available from JBoss EAP 6.4. This String is included in the suffix appended to rotated logs. The format of the suffix is a dot (.) followed by a date String which is able to be parsed by the SimpleDateFormat class.
For example, assuming a log file named server.log and a suffix value of .YYYY-mm, the first log file rotated on 1 October 2014 would be named server.log.2014-10.1. In this example, the 2014-10 portion of the suffix is derived from the value of suffix.

12.6.7. Periodic Size Rotating Log Handler Properties

Table 12.12. Periodic Size Log Handler Properties

Property Datatype Description
append Boolean
If set to true then all messages written by this handler will be appended to the file if it already exists. If set to false a new file will be created each time the application server launches. Changes to append require a server reboot to take effect.
rotate-size String
The maximum size that the log file can reach before it is rotated.
max-backup-index Integer
The maximum number of size-rotated logs that are kept. When this number is reached, the oldest log is reused. Default: 1.
This setting only applies to logs that are rotated based on file size.
Note that if a file is rotated with a date format suffix, it will not be purged using the max-backup-index option.
suffix String
This String is appended to the filename of the rotated logs and is used to determine the frequency of rotation. The format of the suffix is a dot (.) followed by a date String which is able to be parsed by the SimpleDateFormat class. The log is rotated on the basis of the smallest time unit defined by the suffix. Note that the smallest time unit allowed in the suffix attribute is minutes.
For example, a suffix value of .YYYY-MM-dd will result in daily log rotation. Assuming a log file named server.log and a suffix value of .YYYY-MM-dd, the log file rotated on 20 October 2014 would be named server.log.2014-10-19. For a periodic log handler, the suffix includes the previous value for the smallest time unit. In this example the value for dd is 19, the previous day.
autoflush Boolean
If set to true the log messages will be sent to the handlers assigned file immediately upon receipt.
file Object
Object that represents the file where the output of this log handler is written to. It has two configuration properties, relative-to and path.
relative-to String
This is a property of the file object and is the directory containing the log file. File path variables can be specified here. The jboss.server.log.dir variable points to the log/ directory of the server.
path String
This is a property of the file object and is the name of the file where the log messages will be written. It is a relative path name that is appended to the value of the relative-to property to determine the complete path.
enabled Boolean
If set to true, the handler is enabled and functioning as normal. If set to false, the handler is ignored when processing log messages.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that does not match a pattern: not(match("JBAS.*"))
rotate-on-boot Boolean
If set to true, a new log file will be created on server restart. Default is false.
formatter String
The log formatter used by this log handler.
level String
The minimum level of log message the log handler records.
name String
The unique identifier for this log handler.
named-formatter String
The name of the defined formatter to be used on the handler.
encoding String
The character encoding scheme to be used for the output.

12.6.8. Async Log Handler Properties

Table 12.13. Async Log Handler Properties

Property Datatype Description
level String
The maximum level of log message the log handler records.
name String
The unique identifier for this log handler.
encoding String
The character encoding scheme to be used for the output.
formatter String
The log formatter used by this log handler.
queue-length Integer
Maximum number of log messages that will be held by this handler while waiting for sub-handlers to respond.
overflow-action String
How this handler responds when its queue length is exceeded. This can be set to BLOCK or DISCARD. BLOCK makes the logging application wait until there is available space in the queue. This is the same behavior as an non-async log handler. DISCARD allows the logging application to continue but the log message is deleted.
subhandlers String[]
This is the list of log handlers to which this async handler passes its log messages.
enabled Boolean
If set to true, the handler is enabled and functioning as normal. If set to false, the handler is ignored when processing log messages.
filter-spec String
An expression value that defines a filter. The following expression defines a filter that does not match a pattern: not(match("JBAS.*"))