diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2021-07-28 01:43:55 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2021-07-29 00:01:57 +0200 |
| commit | 1e874e790c12839695761a654b44fb427149a353 (patch) | |
| tree | 6942441ac511ec1417b2434b111101fa8d7f7e68 /playground/restlog.sh | |
init
Diffstat (limited to 'playground/restlog.sh')
| -rwxr-xr-x | playground/restlog.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/playground/restlog.sh b/playground/restlog.sh new file mode 100755 index 0000000..debbd81 --- /dev/null +++ b/playground/restlog.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +LOG_LEVEL=DEBUG +CONF_PATH=$DATA_PATH/restlog.yaml +DB_PATH=$DATA_PATH/restlog.db + +cat > $CONF_PATH << EOF +log: + version: 1 + formatters: + console_formatter: + format: "[%(asctime)s %(levelname)s %(name)s] %(message)s" + handlers: + console_handler: + class: logging.StreamHandler + formatter: console_formatter + level: DEBUG + loggers: + hat.monitor: + level: $LOG_LEVEL + root: + level: INFO + handlers: ['console_handler'] + disable_existing_loggers: false +host: '127.0.0.1' +port: 23233 +db_path: $DB_PATH +max_results: 100 +EOF + +exec $PYTHON -m restlog --conf $CONF_PATH "$@" |
