Categorygithub.com/neatio-network/log15-go
modulepackage
1.1.1
Repository: https://github.com/neatio-network/log15-go.git
Documentation: pkg.go.dev

# README

Log15 Go Library

# Packages

No description provided by the author
No description provided by the author

# Functions

BufferedHandler writes all records to a buffered channel of the given size which flushes into the wrapped handler whenever it is available for writing.
CallerFileHandler returns a Handler that adds the line number and file of the calling function to the context with key "caller".
CallerFuncHandler returns a Handler that adds the calling function name to the context with key "fn".
CallerStackHandler returns a Handler that adds a stack trace to the context with key "stack".
ChannelHandler writes all records to the given channel.
Crit is a convenient alias for Root().Crit.
Debug is a convenient alias for Root().Debug.
DiscardHandler reports success for all writes but does nothing.
Error is a convenient alias for Root().Error.
A FailoverHandler writes all log records to the first handler specified, but will failover and write to the second handler if the first handler has failed, and so on for all handlers specified.
FileHandler returns a handler which writes log records to the give file using the given format.
FilterHandler returns a Handler that only writes records to the wrapped Handler if the given function evaluates true.
FormatFunc returns a new Format object which uses the given function to perform record formatting.
FuncHandler returns a Handler that logs records with the given function.
Info is a convenient alias for Root().Info.
JsonFormat formats log records as JSON objects separated by newlines.
JsonFormatEx formats log records as JSON objects.
LazyHandler writes all values to the wrapped handler after evaluating any lazy functions in the record's context.
LogfmtFormat prints records in logfmt format, an easy machine-parseable but human-readable format for key/value pairs.
LvlFilterHandler returns a Handler that only writes records which are less than the given verbosity level to the wrapped Handler.
Returns the appropriate Lvl from a string name.
MatchFilterHandler returns a Handler that only writes records to the wrapped Handler if the given key in the logged context matches the value.
A MultiHandler dispatches any write to each of its handlers.
NetHandler opens a socket to the given address and writes records over the connection.
New returns a new logger with the given context.
Notice is a convenient alias for Root().Notice.
Root returns the root logger.
StreamHandler writes log records to an io.Writer with the given format.
SyncHandler can be wrapped around a handler to guarantee that only a single Log operation can proceed at a time.
SyslogHandler opens a connection to the system syslog daemon by calling syslog.New and writes all records to it.
SyslogHandler opens a connection to a log daemon over the network and writes all log records to it.
TerminalFormat formats log records optimized for human readability on a terminal with color-coded level output and terser human friendly timestamp.
Warn is a convenient alias for Root().Warn.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

The Must object provides the following Handler creation functions which instead of returning an error parameter only return a Handler and panic on failure: FileHandler, NetHandler, SyslogHandler, SyslogNetHandler.
No description provided by the author
No description provided by the author

# Structs

Lazy allows you to defer calculation of a logged value that is expensive to compute until it is certain that it must be evaluated with the given filters.
A Record is what a Logger asks its handler to write.
No description provided by the author

# Interfaces

No description provided by the author
A Logger prints its log records by writing to a Handler.
A Logger writes key/value pairs to a Handler.

# Type aliases

Ctx is a map of key/value pairs to pass as context to a log function Use this only if you really need greater safety around the arguments you pass to the logging functions.
No description provided by the author