Categorygithub.com/paralin/ipfs-go-logrus
modulepackage
0.0.0-20240410105224-e24cb05f9e98
Repository: https://github.com/paralin/ipfs-go-logrus.git
Documentation: pkg.go.dev

# README

ipfs-go-logrus

Go Reference Go Report Card Widget

ipfs-go-logrus modifies ipfs/go-log to use logrus instead of zap to use over 4MB less binary size.

Install

go get github.com/ipfs/go-log

Usage

Once the package is imported under the name logging, an instance of EventLogger can be created like so:

var log = logging.Logger("subsystem name")

License

MIT

# Functions

FormatRFC3339 returns the given time in UTC with RFC3999Nano format.
GetConfig returns a copy of the saved config.
LevelFromString parses a string-based level and returns the corresponding LogLevel.
Logger retrieves an event logger by name.
No description provided by the author
SetAllLoggers changes the logging level of all loggers to lvl.
SetDebugLogging calls SetAllLoggers with logging.DEBUG.
SetupLogging will initialize the logger backend and set the flags.
WithSkip returns a new logger that skips the specified number of stack frames when reporting the line/file.

# Variables

ErrNoSuchLogger is returned when the util pkg is asked for a non existent logger.
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
No description provided by the author

# Structs

ZapEventLogger implements the EventLogger and wraps a go-logging Logger.

# Interfaces

EventLogger extends the StandardLogger interface to allow for log items containing structured metadata.
StandardLogger provides API compatibility with standard printf loggers eg.

# Type aliases

LogLevel represents a log severity level.