eos
eos copied to clipboard
DAWN-456 ⁃ Add ability to reload logging configuration on the fly
eosiod needs to be able to change logging levels without restarting. Add the ability to reload the logging configuration on the fly.
ATC
Prerequisites
- A local test net with a single
eosiodprocess on the test machine running the newest code
Side Effects
- Ordinarily expected log messages will not be present in the log
Procedure
- With
eosiodrunning, verify itsstderr.txtis present and updating. - Edit
logging.jsonfor the runningeosiod:
- In the
loggerssection, in the value for"level", change"info"to"warn"
- Send
SIGHUPtoeosiod:
pkill -HUP eosiod
- Verify "
Received HUP. Reloading logging configuration." appears instderr.txtandInfoand below log messages no longer appear. In particular "Not producing block because it isn't my turn" will stop appearing. - Edit
logging.jsonfor the runningeosiod:
- In the
loggerssection, change"warn"to"info"
- Send
SIGHUPtoeosiodas before. - Verify "
Not producing block because it isn't my turn" appears instderr.txtagain. No "Received HUP" message is expected, as it is logged withInfopriority. - Edit
logging.jsonfor the runningeosiod:
- In the
loggerssection, change"debug"to"bogus"
- Send
SIGHUPtoeosiodas before. - Verify configuration file is rejected with
7 bad_cast_expection: Bad CastandExpected 'all|debug|info|warn|error|off', but got 'bogus'and logging continues as before.
./eosc get status needs to provide this level of detail - what test/live net am I connected to and what are my parms (servers and ports, etc.)
@comtechnet You should post your comment as a separate ticket. It sounds like a good idea that should be tracked.
closed by #1058