Skip to content

Logging

Seulgi Kim edited this page Jun 20, 2018 · 8 revisions

Logging

$ RUST_LOG="debug" codechain

$ RUST_LOG="tx=trace, parcel=info" codechain

Log Level

CodeChain has five log level, error, warn, info, debug and trace.

The error level represents the event something can be dangerous, but it can still run. In the case that cannot run anymore, it must crash ASAP instead of logging.

The warn level represents the event that is potentially dangerous.

The info level represents the event that is not dangerous but it's useful to know for users.

The debug level represents the event that is useful for developers not for users.

codechain-logger

macros

CodeChain has the macro for designated log targets.