Documentation ¶
Index ¶
- Constants
- func AddLoggingContext(ctx string, w io.WriteCloser)
- func Global() *log.Entry
- func RemoveLoggingContext(ctx string)
- func SetGlobalLoggerLevel(level log.Level) (log.Level, error)
- func SetGlobalLoggerLevelFromString(s string) (log.Level, error)
- func SetGlobalOutput(w io.WriteCloser) error
- func SetLevel(ctx string, level log.Level) (log.Level, error)
- func SetLevelFromString(ctx, s string) (log.Level, error)
- func SetOutput(ctx string, w io.WriteCloser) error
- func UsingCtx(ctx string) *log.Entry
- type ContextLogger
- func (l *ContextLogger) AddLoggingContext(ctx string, w io.WriteCloser)
- func (l *ContextLogger) Global() *log.Entry
- func (l *ContextLogger) RemoveLoggingContext(ctx string)
- func (l *ContextLogger) SetGlobalLoggerLevel(level log.Level) (log.Level, error)
- func (l *ContextLogger) SetGlobalLoggerLevelFromString(s string) (log.Level, error)
- func (l *ContextLogger) SetGlobalOutput(w io.WriteCloser) error
- func (l *ContextLogger) SetLevel(ctx string, level log.Level) (log.Level, error)
- func (l *ContextLogger) SetLevelFromString(ctx, s string) (log.Level, error)
- func (l *ContextLogger) SetOutput(ctx string, w io.WriteCloser) error
- func (l *ContextLogger) UsingCtx(ctx string) *log.Entry
- type Handler
Constants ¶
View Source
const GlobalLoggerCtx = "global"
Variables ¶
This section is empty.
Functions ¶
func AddLoggingContext ¶
func AddLoggingContext(ctx string, w io.WriteCloser)
func RemoveLoggingContext ¶
func RemoveLoggingContext(ctx string)
func SetGlobalOutput ¶
func SetGlobalOutput(w io.WriteCloser) error
Types ¶
type ContextLogger ¶
func NewContextLogger ¶
func NewContextLogger(globalLoggerWriter io.WriteCloser) *ContextLogger
func (*ContextLogger) AddLoggingContext ¶
func (l *ContextLogger) AddLoggingContext(ctx string, w io.WriteCloser)
func (*ContextLogger) Global ¶
func (l *ContextLogger) Global() *log.Entry
func (*ContextLogger) RemoveLoggingContext ¶
func (l *ContextLogger) RemoveLoggingContext(ctx string)
func (*ContextLogger) SetGlobalLoggerLevel ¶
func (*ContextLogger) SetGlobalLoggerLevelFromString ¶
func (l *ContextLogger) SetGlobalLoggerLevelFromString(s string) (log.Level, error)
func (*ContextLogger) SetGlobalOutput ¶
func (l *ContextLogger) SetGlobalOutput(w io.WriteCloser) error
func (*ContextLogger) SetLevelFromString ¶
func (l *ContextLogger) SetLevelFromString(ctx, s string) (log.Level, error)
func (*ContextLogger) SetOutput ¶
func (l *ContextLogger) SetOutput(ctx string, w io.WriteCloser) error
type Handler ¶
type Handler struct { Writer io.WriteCloser // contains filtered or unexported fields }
func NewHandler ¶
func NewHandler(w io.WriteCloser) *Handler
func (*Handler) CloseWriter ¶
func (h *Handler) CloseWriter()
func (*Handler) SetOutput ¶
func (h *Handler) SetOutput(w io.WriteCloser)
Click to show internal directories.
Click to hide internal directories.