# README
lager
Lager is a logging library for go
[!NOTE]
This repository should be imported as
code.cloudfoundry.org/lager/v3
.
Docs
Contributing
See the Contributing.md for more information on how to contribute.
Working Group Charter
This repository is maintained by App Runtime
Platform
under Diego
area.
[!IMPORTANT]
Content in this file is managed by the CI task
sync-readme
and is generated by CI following a convention.
# Packages
No description provided by the author
Package lagerctx provides convenience when using Lager with the context feature of the standard library.
No description provided by the author
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
NewHandler wraps the logger as a slog.Handler The supplied Logger must be a lager.logger type created by lager.NewLogger(), otherwise it panics.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewRedactingSink creates a sink that redacts sensitive information from the data field.
NewSlogSink wraps a slog.Logger as a lager Sink This allows code using slog to integrate with code that uses lager Note the following log level conversions:
lager.DEBUG -> slog.LevelDebug lager.ERROR -> slog.LevelError lager.FATAL -> slog.LevelError default -> slog.LevelInfo.
NewTruncatingSink returns a sink that truncates strings longer than the max data string length Example:
writerSink := lager.NewWriterSink(os.Stdout, lager.INFO) sink := lager.NewTruncatingSink(testSink, 20) logger := lager.NewLogger("test") logger.RegisterSink(sink) logger.Info("message", lager.Data{"A": strings.Repeat("a", 25)}).
No description provided by the author
# 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
# Structs
No description provided by the author
No description provided by the author
No description provided by the author