diff options
Diffstat (limited to 'playground')
| -rwxr-xr-x | playground/build.sh | 6 | ||||
| -rwxr-xr-x | playground/client-status-linux.sh | 7 | ||||
| -rw-r--r-- | playground/env.sh | 8 | ||||
| -rwxr-xr-x | playground/restlog.sh | 33 |
4 files changed, 54 insertions, 0 deletions
diff --git a/playground/build.sh b/playground/build.sh new file mode 100755 index 0000000..afd3f13 --- /dev/null +++ b/playground/build.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +cd $ROOT_PATH +exec $PYTHON -m doit build diff --git a/playground/client-status-linux.sh b/playground/client-status-linux.sh new file mode 100755 index 0000000..fa8dc90 --- /dev/null +++ b/playground/client-status-linux.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +. $(dirname -- "$0")/env.sh + +exec $PYTHON -m restlog.clients.status.linux \ + --source client1 \ + http://127.0.0.1:23233 diff --git a/playground/env.sh b/playground/env.sh new file mode 100644 index 0000000..076803f --- /dev/null +++ b/playground/env.sh @@ -0,0 +1,8 @@ +PYTHON=${PYTHON:-python3} +PLAYGROUND_PATH=$(cd $(dirname -- "$0") && pwd) +ROOT_PATH=$PLAYGROUND_PATH/.. +DATA_PATH=$PLAYGROUND_PATH/data + +export PYTHONPATH=$ROOT_PATH/src_py + +mkdir -p $DATA_PATH 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 "$@" |
