Skip to main content
The log endpoints provide access to server logs, including main logs, request logs, and error logs.

Prerequisites

Log endpoints require file logging to be enabled:
If file logging is disabled, log endpoints return an error.

Get Logs

endpoint
/v0/management/logs
Returns log entries from the main log file with support for incremental loading.

Request

Query Parameters

integer
Maximum number of log lines to return (most recent)
integer
Unix timestamp to filter logs after (for incremental loading)

Response

string[]
Array of log lines
number
Total number of lines processed
number
Unix timestamp of the most recent log entry (use for next incremental request)

Delete Logs

endpoint
/v0/management/logs
Clears all log files:
  • Truncates active log file (main.log)
  • Removes all rotated log files (main.log.1, main-2026-03-11.log, etc.)

Request

Response

boolean
Whether deletion was successful
string
Success message
number
Number of rotated log files removed

Get Request Error Logs

endpoint
/v0/management/request-error-logs
Lists error request log files created when request-log is disabled.

Request

Response

object[]
List of error log files
string
File name
number
File size in bytes
number
Last modified timestamp (Unix)
When request-log: true, this endpoint returns an empty array since all requests are logged to the main log file.

Download Error Log by Name

endpoint
/v0/management/request-error-logs/:name
Downloads a specific error log file.

Request

Response

File download with Content-Disposition: attachment.

Get Request Log by ID

endpoint
/v0/management/request-log-by-id/:id
Finds and downloads a request log file by its request ID.

Request

Path Parameters

string
required
Request ID to search for (matches log file suffix *-{id}.log)

Response

File download with the matched log file.

Error Responses

Log File Formats

Main Log Format

Each line starts with:
  • Timestamp: [YYYY-MM-DD HH:MM:SS]
  • Level: INFO, DEBUG, WARN, ERROR
  • Message

Error Log File Naming

Error logs use the format:
Example: error-2026-03-11-10-30-45-req123.log

Rotated Log File Naming

Two rotation formats are supported: Numeric rotation:
Timestamp rotation:

Incremental Log Loading

Use the after parameter with latest-timestamp for efficient polling:

How It Works

  1. First request returns last 100 lines with latest-timestamp: 1710172860
  2. Second request with after=1710172860 returns only lines newer than that timestamp
  3. Continue polling with the latest timestamp for incremental updates

Log Configuration Endpoints

Get Request Log Setting

Enable Request Logging

Get Logging to File Setting

Enable File Logging

Log Rotation Settings

Get Max Total Size

Set Max Total Size

Set maximum total size for all log files in MB (0 = unlimited):

Get Max Error Log Files

Set Max Error Log Files

Set maximum number of error log files to retain:

Complete Logging Configuration

Error Responses

Logging Disabled

Returned when logging-to-file: false.

Log Directory Not Configured

Log File Not Found

Invalid Request ID

Returned when request ID contains path separators.

Log Directory Location

Logs are written to:
  1. Directory specified in log configuration (if set)
  2. ./logs/ directory relative to server working directory (default)
The management handler automatically detects the log directory based on the server configuration.

Use Cases

Real-time Log Monitoring

Download All Error Logs

Clear Old Logs

Next Steps