Closed arnetheduck closed 3 years ago
Yes, I restricted the logging to stdout and removed the colours, to avoid double-logging surprises and facilitate log analysis:
I don't know how to enable an optional log file without having it always on.
we have users using the --log-file
option, so it needs to be present in binary builds. @zah is adding dynamic color options as well.
I don't know how to enable an optional log file without having it always on.
this is what the default build does, so it must be possible somehow?
this is what the default build does
No, the default build will always write a log file in the current working directory, which is a potential blocker when you use an init/service script that doesn't ensure a writeable workdir - and also a terrible idea to dump huge logs on an unsuspecting user.
I can look into this for the next release. The --log-file
option used to work correctly in the past (if not specified, no log file created).
I encountered this issue when running on Windows in https://github.com/status-im/infra-nimbus/issues/59:
{"lvl":"WRN","ts":"2021-07-18 17:05:15.093+00:00","msg":"The --log-file option is not active in the current build","tid":2304,"file":"nimbus_binary_common.nim:71"}
And as I can see it logs to the pwd
of the process.
it logs to the pwd of the process
That's by default, and I disabled it for distributed binaries with -d:chronicles_sinks=textlines
(a "sink" is a logging output and elsewhere that is set to textlines,json[file]
).
Defining testnet_servers_image
also disables it: https://github.com/status-im/nimbus-eth2/blob/stable/beacon_chain/nimbus_beacon_node.nim.cfg
v1.0.7, linux
looks like these were built as a server version?