kopia lustrzana https://github.com/dgtlmoon/changedetection.io
App logs - Send TRACE and INFO logs to stdout (#3051)
rodzic
5a2d84d8b4
commit
6b0e56ca80
|
@ -172,8 +172,8 @@ jobs:
|
||||||
curl --retry-connrefused --retry 6 -s -g -6 "http://[::1]:5556"|grep -q checkbox-uuid
|
curl --retry-connrefused --retry 6 -s -g -6 "http://[::1]:5556"|grep -q checkbox-uuid
|
||||||
|
|
||||||
# Check whether TRACE log is enabled.
|
# Check whether TRACE log is enabled.
|
||||||
# Also, check whether TRACE is came from STDERR
|
# Also, check whether TRACE came from STDOUT
|
||||||
docker logs test-changedetectionio 2>&1 1>/dev/null | grep 'TRACE log is enabled' || exit 1
|
docker logs test-changedetectionio 2>/dev/null | grep 'TRACE log is enabled' || exit 1
|
||||||
# Check whether DEBUG is came from STDOUT
|
# Check whether DEBUG is came from STDOUT
|
||||||
docker logs test-changedetectionio 2>/dev/null | grep 'DEBUG' || exit 1
|
docker logs test-changedetectionio 2>/dev/null | grep 'DEBUG' || exit 1
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ def main():
|
||||||
# Without this, a logger will be duplicated
|
# Without this, a logger will be duplicated
|
||||||
logger.remove()
|
logger.remove()
|
||||||
try:
|
try:
|
||||||
log_level_for_stdout = { 'DEBUG', 'SUCCESS' }
|
log_level_for_stdout = { 'TRACE', 'DEBUG', 'INFO', 'SUCCESS' }
|
||||||
logger.configure(handlers=[
|
logger.configure(handlers=[
|
||||||
{"sink": sys.stdout, "level": logger_level,
|
{"sink": sys.stdout, "level": logger_level,
|
||||||
"filter" : lambda record: record['level'].name in log_level_for_stdout},
|
"filter" : lambda record: record['level'].name in log_level_for_stdout},
|
||||||
|
|
Ładowanie…
Reference in New Issue