---
title: Creating log publishers
description: Create a new log publisher with dsconfig, either from the command line or in interactive mode.
component: pingdirectory
version: 9.3
page_id: pingdirectory:pingdatametrics_server_administration_guide:pd_met_create_log_publishers
canonical_url: https://docs.pingidentity.com/pingdirectory/9.3/pingdatametrics_server_administration_guide/pd_met_create_log_publishers.html
revdate: September 13, 2023
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Creating log publishers

Create a new log publisher with `dsconfig`, either from the command line or in interactive mode.

## About this task

Retention and rotation policies must be configured for the log publisher. Perform the following steps to create a log publisher.

|   |                                                                                                                                                          |
| - | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Compression cannot be disabled or turned off after being configured for the logger. Determine logging requirements before creating and configuring them. |

## Steps

1. Run the following command to create a log publisher with the `dsconfig` command that 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
   ```

   1. To configure compression on the logger, add this option to the previous command:

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

2. To view log publishers, run the command:

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