5.4. Logging Attributes
5.4.1. About Log Levels
WARNwill only record messages of the levels
5.4.2. Supported Log Levels
Table 5.2. Supported Log Levels
|TRACE||400|| Used for messages that provide detailed information about the running state of an application. |
|DEBUG||500|| Used for messages that indicate the progress of individual requests or activities of an application. |
|INFO||800||Used for messages that indicate the overall progress of the application. Used for application start up, shut down and other major lifecycle events.|
|WARN||900||Used to indicate a situation that is not in error but is not considered ideal. Indicates circumstances that can lead to errors in the future.|
|ERROR||1000||Used to indicate an error that has occurred that could prevent the current activity or request from completing but will not prevent the application from running.|
|FATAL||1100||Used to indicate events that could cause critical service failure and application shutdown and possibly cause JBoss Data Grid to shut down.|
5.4.3. About Log Categories
WARNINGlog level results in log values of
5.4.4. About the Root Logger
server.log. This file is sometimes referred to as the server log.
5.4.5. About Log Handlers
5.4.6. Log Handler Types
Table 5.3. Log Handler Types
|Log Handler Type||Description||Use Case|
|Console|| Console log handlers write log messages to either the host operating system’s standard out (||The Console log handler is preferred when JBoss Data Grid is administered using the command line. In such a case, the messages from a Console log handler are not saved unless the operating system is configured to capture the standard out or standard error stream.|
|File||File log handlers are the simplest log handlers. Their primary use is to write log messages to a specified file.||File log handlers are most useful if the requirement is to store all log entries according to the time in one place.|
|Periodic||Periodic file handlers write log messages to a named file until a specified period of time has elapsed. Once the time period has elapsed, the specified time stamp is appended to the file name. The handler then continues to write into the newly created log file with the original name.||The Periodic file handler can be used to accumulate log messages on a weekly, daily, hourly or other basis depending on the requirements of the environment.|
|Size||Size log handlers write log messages to a named file until the file reaches a specified size. When the file reaches a specified size, it is renamed with a numeric prefix and the handler continues to write into a newly created log file with the original name. Each size log handler must specify the maximum number of files to be kept in this fashion.||The Size handler is best suited to an environment where the log file size must be consistent.|
|Async||Async log handlers are wrapper log handlers that provide asynchronous behavior for one or more other log handlers. These are useful for log handlers that have high latency or other performance problems such as writing a log file to a network file system.||The Async log handlers are best suited to an environment where high latency is a problem or when writing to a network file system.|
|Custom|| Custom log handlers enable to you to configure new types of log handlers that have been implemented. A custom handler must be implemented as a Java class that extends ||Custom log handlers create customized log handler types and are recommended for advanced users.|
5.4.7. Selecting Log Handlers
Consolelog handler is preferred when JBoss Data Grid is administered using the command line. In such a case, errors and log messages appear on the console window and are not saved unless separately configured to do so.
Filelog handler is used to direct log entries into a specified file. This simplicity is useful if the requirement is to store all log entries according to the time in one place.
Periodiclog handler is similar to the
Filehandler but creates files according to the specified period. As an example, this handler can be used to accumulate log messages on a weekly, daily, hourly or other basis depending on the requirements of the environment.
Sizelog handler also writes log messages to a specified file, but only while the log file size is within a specified limit. Once the file size reaches the specified limit, log files are written to a new log file. This handler is best suited to an environment where the log file size must be consistent.
Asynclog handler is a wrapper that forces other log handlers to operate asynchronously. This is best suited to an environment where high latency is a problem or when writing to a network file system.
Customlog handler creates new, customized types of log handlers. This is an advanced log handler.
5.4.8. About Log Formatters