tendermint / tmkms

Key Management service for Tendermint Validator nodes
Apache License 2.0
141 stars 42 forks source link

How to control log level of tmkms #353

Open whunmr opened 5 years ago

whunmr commented 5 years ago

I'd like to install the tmkms as a service, which running long enough. so I tried to let kms only print error level logs.
but seems RUST_LOG=error not works.

Any suggestions? Thanks.

j@j ~ $ RUST_LOG=error ./tmkms start -c tmkms.toml
13:45:07 [info] tmkms 0.6.3 starting up...
13:45:07 [info] [keyring:softsign] added consensus key coinexvalconspub1zcjduepq37l2ulws68yhe5aaeh4sk4q6r78chxcd3zse2ewr9nplpzjvrcxqgn25jz
13:45:07 [info] KMS node ID: 25150CF2E0400E57AB29475C78E28836C247D985
13:45:07 [error] [coinexdex-test1@tcp://127.0.0.1:26658] I/O error: Connection refused (os error 111)
13:45:08 [info] KMS node ID: 25150CF2E0400E57AB29475C78E28836C247D985
13:45:08 [error] [coinexdex-test1@tcp://127.0.0.1:26658] I/O error: Connection refused (os error 111)
13:45:09 [info] KMS node ID: 25150CF2E0400E57AB29475C78E28836C247D985
13:45:09 [error] [coinexdex-test1@tcp://127.0.0.1:26658] I/O error: Connection refused (os error 111)
^C
tarcieri commented 5 years ago

Right now there is only a coarse grained option to do debug logging via the -v command-line argument. I agree it'd be good to offer finer-grained control of the loglevel via command line options and/or configuration.

whunmr commented 5 years ago

Got it, Thanks for reply @tarcieri

tarcieri commented 4 years ago

Note that with v0.7.0 logging is now handled by tracing. The framework supports fine-grained loglevels but these still aren't exposed in any user-facing way.