Notification Logging Service
Since version 126.96.36.199
Payara Notification Logging Service captures information about events which come from other services, such as the JMX Monitoring Service, the HealthCheck service or the Request Tracing service and stores it into a log file.
All the generated logs are stored in server.log by default. But, since Payara Server 188.8.131.52 it is possible to configure the Log Notifier to output to a separate log file. More information on Log Notifier can be found on the the Log Notifier.
If Log Notifier is configured to use a separate log file, the default log file can be found at:
|Log File Name and Location|
Payara Notification Logging Service uses its own collection of logging properties that is stored in a configuration file. By default logging properties file can be found at:
|Logging Properties File Name and Location|
Configuring the Payara Notification Logging Service
This section will go through following topics:
|Payara server most be restarted after changes are made to logging options for it to apply.|
Enabling or Disabling Logging to a File
Log to File option will provide a way to enable and disable logging to a file
of Payara Server Notifications. When disabled this should help to minimize disk
usage. This option will be more accommodating if Payara server is running in
cloud environment where disk space is scarce.
Configuring Log File Rotation
By default log rotation is set to rotate when the log file reaches 2 Megabytes(MB). Nonetheless, there are number of ways log rotation can be configured. Size of file at which the log rotates can be changed, it can be set to rotate at date change, rotate when time limit is reached and, finally based on maximum number of history files. Further details about these options will be explained in the following section:
Rotation on Date Change
Rotation On Date Change option provides a way to set log rotation at date change (at midnight).
Use the following command to enable or disabled rotation of log on date change:
asadmin> set-log-attributes fish.payara.enterprise.server.logging.PayaraNotificationFileHandler.rotationOnDateChange=false
Rotation on File Size
File Rotation Limit option provides a way to change the file size at which
the Payara Server rotates the log file. This option accepts an integer value
specifying the maximum size of the log file, after which a file rotation will
occur. The minimum size it can be set to is 500000 Bytes. If the value for this
option is set to 0 rotation is disabled.
Use the following command to change rotation of log on file size:
asadmin> set-log-attributes fish.payara.enterprise.server.logging.PayaraNotificationFileHandler.rotationLimitInBytes=500000
Rotation on Time Limit
File Roatation Time Limit option provides a way to change the log file
rotation time limit interval.
To Change Logging Format
Since version 5.183
Log File Logging Format option will provide a way to change logging format. There are 3 logging formats available: ULF, ODL and JSON.
To Set Maximum Number of History Files
Maximum History Files option provides a way to set the limit on the number of
log files that can be created by Payara Server. Once the number of files
reaches the set limit, oldest rotated log file is deleted. If the value for
this option is set 0, all the rotated log files are preserved.
To change the Name and Location of the Log File
Log File option provides a way to change the name and location of the log
To Set Compress on Rotation
Compress on Rotation provides a way to set compression of log files on