Creating new log publishers
The server provides customization options to help you create your own log publishers with the dsconfig
command.
When you create a new log publisher, you must also configure the log retention and rotation policies for each new publisher.
For more information, see Configuring Log Rotation and Configuring Log Retention.
Creating a new log publisher
Steps
-
Use the
dsconfig
command in non-interactive mode to create and configure the new log publisher.Example:
This example shows how to create a logger that only logs disconnect operations.
$ bin/dsconfig create-log-publisher \ --type file-based-access --publisher-name "Disconnect Logger" \ --set enabled:true \ --set "rotation-policy:24 Hours Time Limit Rotation Policy" \ --set "rotation-policy:Size Limit Rotation Policy" \ --set "retention-policy:File Count Retention Policy" \ --set log-connects:false \ --set log-requests:false --set log-results:false \ --set log-file:logs/disconnect.log
To configure compression on the logger, add the
--set compression-mechanism: gzip
option to the previous command.Because compression cannot be disabled or turned off after configured for the logger, plan carefully to determine your logging requirements, including log rotation and retention with regards to compressed logs.
-
View log publishers with the following command.
$ bin/dsconfig list-log-publishers
Creating a log publisher using dsconfig interactive command-line mode
Steps
-
In the command line, enter
bin/dsconfig
. -
Authenticate to the server by following the prompts.
-
In the main menu, select the option to configure the log publisher.
-
In the
Log Publisher menu
, select the option to create a new log publisher. -
Select the Log Publisher type.
For this example, select File-Based Access Log Publisher.
-
Enter a name for the log publisher.
-
Enable it.
-
Enter the path to the log file relative to the PingAuthorize server root.
For this example,
logs/disconnect.log
. -
Select the rotation policy to use for this log publisher.
-
Select the retention policy to use for this log publisher.
-
In the
Log Publisher Properties menu
, select the option forlog-connects:false
,log-disconnects:true
,log-requests:false
, andlog-results:false
. -
Enter
f
to apply the changes.