Officially out now: The TypeDB 3.0 Roadmap >>

Logs

In this guide, you’ll see how to configure and use TypeDB Logs.

Logging options

The log section of the configuration file contains the logging options. There are three subsections, each of which will be discussed in detail below:

Output

output subsection defines destinations to write logs to.

  • User-defined output channel name

    • type — it’s either file or stdout.

    • base-dir (directory prior to version 2.21.0) — filepath, relative to the server binary. Only available for type: file.

    • file-size-limit (file-size-cap prior to version 2.21.0)  — maximum size of a log file. If the log file reaches the limit, a new file in the same directory will be started. This is similar to the maxsize config option in logrotate. Only available for type: file.

    • archive-grouping — configures the rollover and naming policy of archives produced by the logger.
      Possible value variants are as follows:

      • minute or minutes

      • hour or hours

      • day or days

      • week or weeks

      • month or months

      • year or years

  • archive-age-limit — configures how long archive files are kept.
    Old archives are only deleted when new ones are produced.
    If the value is set to zero, then the age is unlimited (old logs are not deleted). Otherwise, the value should be a positive integer, followed by a whitespace and one of the following values for units:

    • minute or minutes

    • hour or hours

    • day or days

    • week or weeks

    • month or months

    • year or years

  • archives-size-limit (archives-size-cap prior to version 2.21.0) — maximum size of all log files. If the total size of all log files in the directory reaches the limit, the oldest one gets removed. Only available for type: file.
    If the value is set to zero, then the total size is unlimited (older logs are not deleted to preserve total size limitation of the log archives). Otherwise, the value should be a positive integer, followed by one of the following values for units:

    • kb

    • mb

    • gb

Logger

logger subsection configures logging for modules in TypeDB, along with a log level and output targets (referencing outputs by name defined under the outputs section).

  • output — destination of the log output. Input format is a list of output channels, each of which must be defined in the output subsection.

  • level — verbosity level.
    One of the following values can be used:

    • warn

    • info

    • debug

On debug level the server will periodically log database storage properties.

Debugger

debugger subsection configures TypeDB-specific debuggers.

Possible values for the type field are the following:

  • reasoner-tracer

  • reasoner-perf-counters