API Logs

By default, Licensing tracks all API requests. These logs can be found on the Logs tab. You can view additional log details by clicking the View Details link underneath each log entry.

You can search through the log messages by using the search box. You can also filter the logs to only show logs of a particular level or from a particular date period.

API Usage

For each request, Licensing will track the time it occurred, the IP, the GET and POST data, and the response. The user the request is associated will also be logged, if it is possible to determine from the API request.

Errors

If an unexpected error occurs while processing the API request, the exception and stack trace will be logged.

Purging

By default, logs are kept for 60 days. Logs are purged every day during a CRON job. To change the amount of time logs are kept, use the itelic_keep_logs_for_days filter like so.

add_filter( 'itelic_keep_logs_for_days', function( $days, $table ) {

    if ( $table->get_slug() == 'itelic-api-logs' ) {
        $days = 90;
    }

    return $days;
}, 10, 2 );

Disable Logging

Logging can be disabled like so.

add_action( 'itelic_api_register_endpoints', function( $dispatch ) {
    $dispatch->setLogger( new Psr\Log\NullLogger() );
} );
Have more questions? Submit a request

Comments

Powered by Zendesk