Logging
Under the logging config option the logging behavior and locations can be
configured.
access¶
object recommended
Under the access option the http access log can be configured.
config.yaml
logging:
access:
dir: /var/log/lighthouse
stderr: true
The following options are available:
dir¶
directory path
optional
LH_LOGGING_ACCESS_DIR
The dir option is used to configure the directory where the log file
should be stored.
If not set, LightHouse will not log to file.
stderr¶
boolean
false
optional
LH_LOGGING_ACCESS_STDERR
The stderr option indicates if LightHouse logs to stderr.
internal¶
The internal option is used to configure logging for LightHouse's internal
logging, i.e. logging related to what LightHouse does.
config.yaml
logging:
internal:
dir: /var/log/lighthouse
stderr: true
level: info
stderr_format: console
dir_format: json
dir¶
directory path
optional
LH_LOGGING_INTERNAL_DIR
The dir option is used to configure the directory where the log file
should be stored.
If not set, LightHouse will not log to file.
stderr¶
boolean
false
optional
LH_LOGGING_INTERNAL_STDERR
The stderr option indicates if LightHouse logs to stderr.
level¶
enum
info
optional
LH_LOGGING_INTERNAL_LEVEL
The level option sets the minimal log level that should be logged.
Shortcut
You can also use LH_LOG_LEVEL as a shortcut for LH_LOGGING_INTERNAL_LEVEL.
Valid values are:
tracedebuginfowarnerrorfatalpanic
stderr_format¶
enum
console
optional
LH_LOGGING_INTERNAL_STDERR_FORMAT
The stderr_format option selects the output format for logs written to
stderr.
Valid values are:
console— human-friendly, colored console output (default)json— structured JSON output for machine parsing
dir_format¶
enum
json
optional
LH_LOGGING_INTERNAL_DIR_FORMAT
The dir_format option selects the output format for logs written to file.
Valid values are:
json— structured JSON output for machine parsing (default)console— human-friendly console output (without ANSI color codes)
banner¶
object optional
Under the banner option, startup banners can be enabled or disabled.
The logo banner is an ANSI art; the version banner is rendered as an
ASCII-art representation of the current Lighthouse version.
config.yaml
logging:
banner:
logo: false
version: false
The following options are available:
logo¶
boolean
true
optional
LH_LOGGING_BANNER_LOGO
The logo option controls printing of the Lighthouse logo banner on startup.
version¶
boolean
true
optional
LH_LOGGING_BANNER_VERSION
The version option controls printing of the version banner on startup.