Documentation ¶
Overview ¶
Package tracelog provides a logger for debugging and tracing This logger will not print anything, unless TRACE_LEVEL is at least 1
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logger ¶
Logger returns the logger from the context, the server injects a logger into each request.
func LoggerFlags ¶
LoggerFlags adds to viper flags
func NewLogger ¶
NewLogger creates a new logger with our setup. It only prints messages below TraceLevel(). The starting point for derived loggers is 1. So in the default configuration, TRACE_LEVEL=0, V(1), nothing is printed. TRACE_LEVEL=1 shows simple log statements, everything above like `details`, or V(3) needs a higher TRACE_LEVEL.
Types ¶
type CtxLoggerKey ¶
type CtxLoggerKey struct{}
Click to show internal directories.
Click to hide internal directories.