Categorygithub.com/go-msvc/log
modulepackage
0.0.0-20200515104948-e039d1c2f30d
Repository: https://github.com/go-msvc/log.git
Documentation: pkg.go.dev

# README

log

Logging

# Functions

CodeText writes the file name and line number.
Column to add to list of columns.
DataText writes the named log data value.
DefaultEncoder returns a default encoder for normal terminal/console log output.
ForThisPackage returns a logger for your package.
GetCaller skipping N levels in call stack.
LevelText writes the level of the log record.
Logger returns a named loggerall loggers are added in a path hierarchy to the top loggerThe name may be any path, but preferably the source pathe.g.
MessageText writes the log message.
ModuleText writes the package and function name.
NameText write the name of the logger.
NewColumnEncoder ...
TimeText writes the timestamp with specified format.
Top returns the top loggerset level/writer on this to change all loggers.
ValidName returns true is name is valid.

# Constants

DebugLevel shows the sequence flow through the program code.
ErrorLevel describes errors, things that needs attention or breaks operation.
FatalLevel logs a message, then calls os.Exit(1).
InfoLevel is the default logging priority (value 0) to show progress and status.
PanicLevel logs then panic (temrminate the program).
TraceLevel prints details values, often hex dumps.
WarnLevel alerts the operator of potential issues.

# Structs

Caller refers to code that wrote the log record.
Record is one log record.

# Interfaces

IColumn in a IColumnEncoder.
IColumnEncoder manages an array of encoders to make up one line of console logging.
IEncoder ...
ILogger ...
ITextValue is used for each column.
LevelEnabler decides whether a given logging level is enabled when logging a message.

# Type aliases

Level determines logger priority.