logging

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGlobalLogger

func SetGlobalLogger(l Logger)

SetGlobalLogger allows to set the global logger instance (for reuse in other projects)

Types

type GinWriter

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

GinWriter wraps zerolog logger to provide io.Writer interface for Gin

func (*GinWriter) Write

func (w *GinWriter) Write(p []byte) (n int, err error)

type Logger

type Logger interface {
	Tracef(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
	Writer() io.Writer
}

Logger is a generic logging interface for the project.

var Global Logger = &dummyLogger{}

Global is the global logger instance for the project.

type ZerologLogger

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

func NewZerologLogger

func NewZerologLogger() *ZerologLogger

func (*ZerologLogger) Debugf

func (l *ZerologLogger) Debugf(format string, args ...interface{})

func (*ZerologLogger) Infof

func (l *ZerologLogger) Infof(format string, args ...interface{})

func (*ZerologLogger) Panicf

func (l *ZerologLogger) Panicf(format string, args ...interface{})

func (*ZerologLogger) Tracef

func (l *ZerologLogger) Tracef(format string, args ...interface{})

func (*ZerologLogger) Warnf

func (l *ZerologLogger) Warnf(format string, args ...interface{})

func (*ZerologLogger) Writer

func (l *ZerologLogger) Writer() io.Writer

Jump to

Keyboard shortcuts

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