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 eitherfile
orstdout
. -
base-dir
(directory
prior to version2.21.0
) — filepath, relative to the server binary. Only available fortype: file
. -
file-size-limit
(file-size-cap
prior to version2.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 themaxsize
config option in logrotate. Only available fortype: file
. -
archive-grouping
— configures the rollover and naming policy of archives produced by the logger.
Possible value variants are as follows:-
minute
orminutes
-
hour
orhours
-
day
ordays
-
week
orweeks
-
month
ormonths
-
year
oryears
-
-
-
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
orminutes
-
hour
orhours
-
day
ordays
-
week
orweeks
-
month
ormonths
-
year
oryears
-
-
archives-size-limit
(archives-size-cap
prior to version2.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 fortype: 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 |