Categorygithub.com/webdestroya/go-log
modulepackage
0.1.0
Repository: https://github.com/webdestroya/go-log.git
Documentation: pkg.go.dev

# README

tieredlog

Simple console logger that is very heavily based on caarlos0/log.

Used heavily on ECSDeployer.

Usage

go get github.com/webdestroya/go-log

Major Differences

  • Adds a TRACE level
  • Allows more adjustment of indent levels and indent amount

# Functions

Debug level message.
Debugf level formatted message.
DecreasePadding decreases the padding 1 times.
Error level message.
Errorf level formatted message.
Fatal level message, followed by an exit.
Fatalf level formatted message, followed by an exit.
FromContext returns the logger from context, or log.Log.
IncreasePadding increases the padding 1 times.
Info level message.
Infof level formatted message.
MustParseLevel parses level string or panics.
New creates a new logger.
NewContext returns a new context with logger.
NewEntry returns a new entry for `log`.
ParseLevel parses level string.
ResetPadding resets the padding to default.
SetLevel sets the log level.
SetLevelFromString sets the log level from a string, panicing when invalid.
Trace level message.
Tracef level formatted message.
Warn level message.
Warnf level formatted message.
WithError returns a new entry with the "error" set to `err`.
WithField returns a new entry with the `key` and `value` set.
WithFields returns a new entry with `fields` set.
WithoutPadding returns a new entry with padding set to default.

# Constants

Log levels.
Log levels.
Log levels.
Log levels.
Log levels.
Log levels.
Log levels.

# Variables

No description provided by the author
ErrInvalidLevel is returned if the severity level is invalid.
No description provided by the author
how far into the line should keypairs be placed.
singletons ftw?.
Now returns the current time.
Strings mapping.
Styles mapping.
No description provided by the author

# Structs

Entry
Entry represents a single log entry.
Logger represents a logger with configurable Level and Handler.

# Interfaces

Fielder is an interface for providing fields to custom types.
Interface represents the API of both Logger and Entry.

# Type aliases

Fields represents a map of entry level data used for structured logging.
Level of severity.