LOG_FILE_PATH => LOG_FILE
This commit is contained in:
parent
449ce373cc
commit
f47336825d
@ -43,7 +43,7 @@ jobs:
|
||||
DATABASE_TYPE: postgres
|
||||
LEVELDB_PATH: ./fixture/chaindata
|
||||
LEVELDB_ANCIENT: ./fixture/chaindata/ancient
|
||||
LOG_FILE_PATH: ./server-log
|
||||
LOG_FILE: ./server-log
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
./eth-statediff-service --config ./test/ci-config.toml serve &
|
||||
|
@ -58,8 +58,8 @@ const (
|
||||
PRERUN_INCLUDE_TD = "PRERUN_INCLUDE_TD"
|
||||
PRERUN_INCLUDE_CODE = "PRERUN_INCLUDE_CODE"
|
||||
|
||||
LOG_LEVEL = "LOG_LEVEL"
|
||||
LOG_FILE_PATH = "LOG_FILE_PATH"
|
||||
LOG_LEVEL = "LOG_LEVEL"
|
||||
LOG_FILE = "LOG_FILE"
|
||||
|
||||
DATABASE_NAME = "DATABASE_NAME"
|
||||
DATABASE_HOSTNAME = "DATABASE_HOSTNAME"
|
||||
@ -145,7 +145,7 @@ func init() {
|
||||
viper.BindEnv("prerun.params.includeCode", PRERUN_INCLUDE_CODE)
|
||||
|
||||
viper.BindEnv("log.level", LOG_LEVEL)
|
||||
viper.BindEnv("log.file", LOG_FILE_PATH)
|
||||
viper.BindEnv("log.file", LOG_FILE)
|
||||
|
||||
viper.BindEnv("debug.pprof", DEBUG_PPROF)
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
[log]
|
||||
# Leave empty to output to stdout
|
||||
file = "" # LOG_FILE_PATH
|
||||
file = "" # LOG_FILE
|
||||
level = "info" # LOG_LEVEL
|
||||
|
||||
[database]
|
||||
|
@ -31,8 +31,8 @@ fi
|
||||
|
||||
START_TIME=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
||||
echo "Running the statediff service" && \
|
||||
if [[ ! -z "$LOG_FILE_PATH" ]]; then
|
||||
$SETUID /app/eth-statediff-service "$VDB_COMMAND" --config=/app/config.toml $* |& $SETUID tee ${LOG_FILE_PATH}.console
|
||||
if [[ ! -z "$LOG_FILE" ]]; then
|
||||
$SETUID /app/eth-statediff-service "$VDB_COMMAND" --config=/app/config.toml $* |& $SETUID tee ${LOG_FILE}.console
|
||||
rc=$?
|
||||
else
|
||||
$SETUID /app/eth-statediff-service "$VDB_COMMAND" --config=/app/config.toml $*
|
||||
|
Loading…
Reference in New Issue
Block a user