---
title: Creating a new log publisher
description: PingDirectory servers provide customization options to create log publishers with the dsconfig command. After creating a new log publisher, configure the log retention and rotation policies. For more information, see Configure log retention and log rotation policies.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdatasync_server_administration_guide:pd_sync_create_log_publisher
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdatasync_server_administration_guide/pd_sync_create_log_publisher.html
revdate: September 13, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Creating a new log publisher

## About this task

PingDirectory servers provide customization options to create log publishers with the `dsconfig` command. After creating a new log publisher, configure the log retention and rotation policies. For more information, see [Configure log retention and log rotation policies](pd_sync_config_log_ret_rot_policies.html).

## Steps

1. Use the `dsconfig` command to create and configure the new log publisher. (If using `dsconfig` in interactive mode, log publishers are created and managed under the Log Publisher menu.) The following example shows how to create a logger that only logs disconnect operations.

   ```shell
   $ 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 following option to the previous command:

   ```
   --set compression-mechanism: gzip
   ```

   Compression cannot be disabled or turned off after it has been configured for the logger. Determine logging requirements before configuring this option.

2. View log publishers with the following command:

   ```shell
   $ bin/dsconfig list-log-publishers
   ```
