mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
fix error log location
This commit is contained in:
parent
26fa63749d
commit
fb8e6cabcb
2 changed files with 11 additions and 8 deletions
|
@ -210,7 +210,7 @@ class NoisyRequestsFilter(logging.Filter):
|
|||
|
||||
return 1
|
||||
|
||||
ERROR_LOG = LOGS_DIR / 'errors.log'
|
||||
ERROR_LOG = (LOGS_DIR / 'errors.log') if LOGS_DIR.exists() else '/dev/null'
|
||||
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
|
@ -245,10 +245,3 @@ LOGGING = {
|
|||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
# log startup message to the error log
|
||||
with open(ERROR_LOG, "a+") as f:
|
||||
command = ' '.join(sys.argv)
|
||||
ts = datetime.now().strftime('%Y-%m-%d__%H:%M:%S')
|
||||
f.write(f"\n> {command}; ts={ts} version={VERSION} docker={IN_DOCKER} is_tty={IS_TTY}\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue