PingDirectory

Log parsing APIs

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

This includes:

  • Use the AccessLogReader class to read and parse access log messages using the server’s default text-based access log format.

  • Use the ErrorLogReader class to read and parse error log messages using the server’s default text-based error log format.

  • Use the AuditLogReader 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), 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 class to files comprised of JSON objects. Use this to read the contents of JSON-formatted access and error log files.