Skip to content

Commit

Permalink
log configuration environment options
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa authored and Totktonada committed Sep 1, 2021
1 parent 175fbfd commit 54d1677
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ Default is 3600 (every 1 hour).

Optional. When set to "true" Tarantool tries to continue if there is an error while reading a snapshot file or a write-ahead log file. Skips invalid records, reads as much data as possible, print a warning in console and start the database.

### `TARANTOOL_LOG_FORMAT`

Optional. There are two possible log formats - 'plain' (default) or 'json' (with more detail and with json labels).
More details can be found in [log module reference](https://www.tarantool.io/en/doc/latest/reference/configuration/#confval-log_format)

### `TARANTOOL_LOG_LEVEL`

Optional. Default value is 5 (that means INFO). More details can be found in [logging log levels configuration](https://www.tarantool.io/en/doc/latest/reference/configuration/#cfg-logging-log-level)

# Reporting problems and getting help

You can report problems and request
Expand Down
4 changes: 4 additions & 0 deletions files/tarantool-entrypoint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ local function wrapper_cfg(override)
file_cfg.TARANTOOL_SLAB_ALLOC_MAXIMAL = os.getenv('TARANTOOL_SLAB_ALLOC_MAXIMAL')
file_cfg.TARANTOOL_PORT = os.getenv('TARANTOOL_PORT')
file_cfg.TARANTOOL_FORCE_RECOVERY = os.getenv('TARANTOOL_FORCE_RECOVERY')
file_cfg.TARANTOOL_LOG_FORMAT = os.getenv('TARANTOOL_LOG_FORMAT')
file_cfg.TARANTOOL_LOG_LEVEL = os.getenv('TARANTOOL_LOG_LEVEL')
file_cfg.TARANTOOL_WAL_MODE = os.getenv('TARANTOOL_WAL_MODE')
file_cfg.TARANTOOL_REPLICATION_SOURCE = os.getenv('TARANTOOL_REPLICATION_SOURCE')
file_cfg.TARANTOOL_REPLICATION = os.getenv('TARANTOOL_REPLICATION')
Expand Down Expand Up @@ -236,6 +238,8 @@ local function wrapper_cfg(override)
override.wal_mode

cfg.force_recovery = file_cfg.TARANTOOL_FORCE_RECOVERY == 'true'
cfg.log_format = file_cfg.TARANTOOL_LOG_FORMAT or 'plain'
cfg.log_level = tonumber(file_cfg.TARANTOOL_LOG_LEVEL) or 5

cfg.wal_dir = override.wal_dir or '/var/lib/tarantool'
cfg.vinyl_dir = override.vinyl_dir or '/var/lib/tarantool'
Expand Down
2 changes: 2 additions & 0 deletions files/tarantool_set_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ local vars = {
TARANTOOL_SLAB_ALLOC_MINIMAL=nop,
TARANTOOL_PORT=nop,
TARANTOOL_FORCE_RECOVERY=nop,
TARANTOOL_LOG_FORMAT=nop,
TARANTOOL_LOG_LEVEL=nop,
TARANTOOL_WAL_MODE=nop,
TARANTOOL_USER_NAME=update_credentials,
TARANTOOL_USER_PASSWORD=update_credentials,
Expand Down

0 comments on commit 54d1677

Please sign in to comment.