logging

package
v0.0.0-...-2b29d23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: GPL-3.0 Imports: 9 Imported by: 42

Documentation

Overview

Package logging supports the consistent logging for modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Output

func Output(f string) (io.Writer, error)

func Outputs

func Outputs(files []string) (io.Writer, error)

func TimeElapsed

func TimeElapsed() func(*zerolog.Event, string)

Types

type HasLogger

type HasLogger interface {
	Log() *zerolog.Logger
}

type Logging

type Logging struct {
	// contains filtered or unexported fields
}

func NewLogging

func NewLogging(f func(zerolog.Context) zerolog.Context) *Logging

func Setup

func Setup(
	output io.Writer, level zerolog.Level, format string, forceColor bool,
) *Logging

func (*Logging) IsTraceLog

func (lg *Logging) IsTraceLog() bool

func (*Logging) Log

func (lg *Logging) Log() *zerolog.Logger

func (*Logging) SetLogger

func (lg *Logging) SetLogger(l zerolog.Logger) *Logging

func (*Logging) SetLogging

func (lg *Logging) SetLogging(l *Logging) *Logging

type SetLogging

type SetLogging interface {
	SetLogging(*Logging) *Logging
}

type ZerologObjectMarshaler

type ZerologObjectMarshaler func(*zerolog.Event)

func (ZerologObjectMarshaler) MarshalZerologObject

func (z ZerologObjectMarshaler) MarshalZerologObject(e *zerolog.Event)

type ZerologSTDLoggingWriter

type ZerologSTDLoggingWriter struct {
	// contains filtered or unexported fields
}

func NewZerologSTDLoggingWriter

func NewZerologSTDLoggingWriter(f func() *zerolog.Event) ZerologSTDLoggingWriter

func (ZerologSTDLoggingWriter) Write

func (w ZerologSTDLoggingWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL