Documentation
¶
Index ¶
- Constants
- func Accounts(event string) zerolog.Logger
- func Consensus(event string) zerolog.Logger
- func Contracts(event string) zerolog.Logger
- func FilterFor(modules ...string) func(w *ConsoleWriter)
- func Metrics() zerolog.Logger
- func Network(event string) zerolog.Logger
- func Node() zerolog.Logger
- func SetLevel(ls string)
- func SetWriter(key string, writer io.Writer)
- func Stake(event string) zerolog.Logger
- func Sync(event string) zerolog.Logger
- func TX(event string) zerolog.Logger
- type ConsoleWriter
- type Formatter
Constants ¶
View Source
const ( LoggerWavelet = "wavelet" LoggerWebsocket = "ws" KeyModule = "mod" KeyEvent = "event" ModuleNode = "node" ModuleNetwork = "network" ModuleAccounts = "accounts" ModuleConsensus = "consensus" ModuleContract = "contract" ModuleSync = "sync" ModuleStake = "stake" ModuleTX = "tx" ModuleMetrics = "metrics" )
Variables ¶
This section is empty.
Functions ¶
func FilterFor ¶
func FilterFor(modules ...string) func(w *ConsoleWriter)
Types ¶
type ConsoleWriter ¶
type ConsoleWriter struct {
// Out is the output destination.
Out io.Writer
// NoColor disables the colorized output.
NoColor bool
// TimeFormat specifies the format for timestamp in output.
TimeFormat string
// PartsOrder defines the order of parts in output.
PartsOrder []string
FormatTimestamp Formatter
FormatLevel Formatter
FormatCaller Formatter
FormatMessage Formatter
FormatFieldName Formatter
FormatFieldValue Formatter
FormatErrFieldName Formatter
FormatErrFieldValue Formatter
FilteredModules map[string]struct{}
}
ConsoleWriter parses the JSON input and writes it in an (optionally) colorized, human-friendly format to Out.
func NewConsoleWriter ¶
func NewConsoleWriter(writer io.Writer, options ...func(w *ConsoleWriter)) ConsoleWriter
NewConsoleWriter creates and initializes a new ConsoleWriter.
Click to show internal directories.
Click to hide internal directories.