Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
NewContext is a simple-to-use function to create a context.Context using logrus as the logger.
Note: the upstream "logrus" is in maintenance-mode. A quote from the README.md:
> Logrus is in maintenance-mode. We will not be introducing new features. > It's simply too hard to do in a way that won't break many people's > projects, which is the last thing you want from your Logging library (again...). > > This does not mean Logrus is dead. Logrus will continue to be maintained > for security, (backwards compatible) bug fixes, and performance (where we > are limited by the interface). > > I believe Logrus' biggest contribution is to have played a part in today's > widespread use of structured logging in Golang. There doesn't seem to be > a reason to do a major, breaking iteration into Logrus V2, since the > fantastic Go community has built those independently. Many fantastic > alternatives have sprung up. Logrus would look like those, had it been > re-designed with what we know about structured logging in Go today. > Check out, for example, Zerolog, Zap, and Apex.
Types ¶
type CompactTextFormatter ¶
type CompactTextFormatter struct {
TimestampFormat string
}