zlog

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogHTTPWriter

type LogHTTPWriter struct {
	Writer io.Writer
	// contains filtered or unexported fields
}

func NewLogHTTPWriter

func NewLogHTTPWriter(serverURL string, warnOnHttpErr bool) *LogHTTPWriter

func (*LogHTTPWriter) Write

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

type Logger

type Logger interface {
	Trace(message string, args ...interface{})
	Debug(message string, args ...interface{})
	Info(message string, args ...interface{})
	Warn(message string, args ...interface{})
	Error(message string, args ...interface{})
	Fatal(message string, args ...interface{})
	Panic(message string, args ...interface{})

	Tracef(ctx context.Context, format string, args ...interface{})
	Debugf(ctx context.Context, format string, args ...interface{})
	Infof(ctx context.Context, format string, args ...interface{})
	Warnf(ctx context.Context, format string, args ...interface{})
	Errorf(ctx context.Context, format string, args ...interface{})
	Fatalf(ctx context.Context, format string, args ...interface{})
	Panicf(ctx context.Context, format string, args ...interface{})

	SetConfig(config configs.LogConfig)
	GetConfig() configs.LogConfig
	IsTraceEnabled() bool
	IsDebugEnabled() bool
	IsInfoEnabled() bool
	IsWarnEnabled() bool
	IsErrorEnabled() bool
	IsFatalEnabled() bool
	IsPanicEnabled() bool
}

Logger interface defines the logging methods

func GetLogger

func GetLogger() Logger

GetLogger returns the global logger instance

func NewLogger added in v0.1.8

func NewLogger() Logger

Directories

Path Synopsis
httpServer command

Jump to

Keyboard shortcuts

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