Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerProvider ¶
func LoggerProvider(cfg *Config, params ...logentryformatter.Param) wlog.LoggerProvider
LoggerProvider returns a wlog.LoggerProvider which formats log entries with wlog templates. The default templates give a human-friendly output suitable for command-line tools. Services which leverage log collection infrastructure should use a JSON-based provider.
Nil configuration is valid and will result in the default behavior.
Types ¶
type Config ¶
type Config struct { // Strict mode emits formatting errors as log lines; by default, the raw output will be printed if it can't be formatted. Strict bool UnwrapperMap map[logentryformatter.LogType]logentryformatter.Unwrapper FormatterMap map[logentryformatter.LogType]logentryformatter.Formatter Only, Exclude map[logentryformatter.LogType]struct{} // DelegateLogger is used to create the intermediate json representation that is passed to the template. DelegateLogger wlog.LoggerProvider }
Click to show internal directories.
Click to hide internal directories.