logging

package
v0.0.0-...-5a6e01e Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

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)

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 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