---
title: Log parsing APIs
description: The UnboundID LDAP SDK for Java provides support for programmatically parsing log file content.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_security_guide:pd_sec_log_parsing_apis
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_security_guide/pd_sec_log_parsing_apis.html
revdate: September 13, 2023
---

# Log parsing APIs

The UnboundID LDAP SDK for Java provides support for programmatically parsing log file content.

This includes:

* Use the [AccessLogReader](https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/ldap/sdk/unboundidds/logs/AccessLogReader.html) class to read and parse access log messages using the server's default text-based access log format.

* Use the [ErrorLogReader](https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/ldap/sdk/unboundidds/logs/ErrorLogReader.html) class to read and parse error log messages using the server's default text-based error log format.

* Use the [AuditLogReader](https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/ldap/sdk/unboundidds/logs/AuditLogReader.html) class to read and parse change records written by the server's audit logger. While the audit logger writes changes in LDIF form (and can therefore also be read by the [LDIFReader](https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/ldif/LDIFReader.html)), the AuditLogReader provides additional support for extracting information from comments that are associated with log messages, including:

  * The message timestamp

  * The connection ID

  * The operation ID

  * The requester distinguished name (DN) and IP address

  * The entry DN for any alternate authorization identity that was used

  * The replication change ID

  * For add operations, whether the operation was an undeleted

  * For delete operations, the attributes from the deleted entry, whether it was a soft delete, or whether it was a subtree delete

  * For modify operations, whether the operation targeted a soft-deleted entry

* Use the [JSONObjectReader](https://docs.ldap.com/ldap-sdk/docs/javadoc/index.html?com/unboundid/util/json/JSONObjectReader.html) class to files comprised of JSON objects. Use this to read the contents of JSON-formatted access and error log files.
