Discover Packages
github.com/thecodingmachine/gotenberg
internal
pkg
xlog
package
Version:
v0.0.0-...-5a98790
Opens a new window with list of versions in this module.
Published: Jul 25, 2021
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Jump to ...
Documentation
Overview
Index
Constants
Variables
Functions
Types
type Level
type Logger
New(level, trace)
(l) DebugOp(op, message)
(l) DebugOpf(op, format, args)
(l) ErrorOp(op, err)
(l) ErrorOpf(op, format, args)
(l) FatalOp(op, err)
(l) InfoOp(op, message)
(l) InfoOpf(op, format, args)
(l) Level()
(l) WithFields(fields)
Source Files
Documentation
Documentation
¶
Package xlog defines a standard logger
for the application.
It uses structured logging thanks to
https://github.com/sirupsen/logrus .
All messages have at least two fields:
A "trace" field which helps to identify
messages belonging to the same context.
An "op" field which helps to identify
the logical operation associated
with the message.
func Levels() []string
type Level
type Logger
func (l Logger) DebugOp(op, message string)
func (l Logger) DebugOpf(op, format string, args ...interface{})
func (l Logger) ErrorOp(op string, err error)
func (l Logger) ErrorOpf(op, format string, args ...interface{})
func (l Logger) FatalOp(op string, err error)
func (l Logger) InfoOp(op, message string)
func (l Logger) InfoOpf(op, format string, args ...interface{})
func (l Logger) Level() Level
func (l Logger) WithFields(fields map[string]interface{}) Logger
Levels returns a slice of string
with all severities.
Level helps setting the severity
of the messages displayed.
const (
DebugLevel Level = "DEBUG"
InfoLevel Level = "INFO"
ErrorLevel Level = "ERROR"
)
MustParseLevel returns the Level corresponding
to given string.
It panics if no correspondence.
Logger enforces specific log message formats.
New returns a xlog.Logger.
DebugOp logs a debug message for given
logical operation.
func (l Logger ) DebugOpf(op, format string , args ...interface{})
DebugOpf logs a debug message for given
logical operation and format.
ErrorOp logs an error for given
logical operation.
func (l Logger ) ErrorOpf(op, format string , args ...interface{})
ErrorOpf logs an error message for given
logical operation and format.
FatalOp logs an error for given
logical operation and exit 1.
InfoOp logs an info message for given
logical operation.
func (l Logger ) InfoOpf(op, format string , args ...interface{})
InfoOpf logs an info message for given
logical operation and format.
Level returns the current Level.
WithFields returns a new xlog.Logger with
given fields.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.