logger

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServerLogger

func NewServerLogger(cfg *config.Config) *serverLogger

App Logger constructor

Types

type Logger

type Logger interface {
	InitLogger()
	Debug(args ...interface{})
	Debugf(template string, args ...interface{})
	Info(args ...interface{})
	Infof(template string, args ...interface{})
	Warn(args ...interface{})
	Warnf(template string, args ...interface{})
	Error(args ...interface{})
	Errorf(template string, args ...interface{})
	DPanic(args ...interface{})
	DPanicf(template string, args ...interface{})
	Fatal(args ...interface{})
	Fatalf(template string, args ...interface{})
}

Logger methods interface

type WrappedWriteSyncer added in v1.0.3

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

WrappedWriteSyncer is a helper struct implementing zapcore.WriteSyncer to wrap a standard os.Stdout handle, giving control over the WriteSyncer's Sync() function. Sync() results in an error on Windows in combination with os.Stdout ("sync /dev/stdout: The handle is invalid."). WrappedWriteSyncer simply does nothing when Sync() is called by Zap.

func (WrappedWriteSyncer) Sync added in v1.0.3

func (mws WrappedWriteSyncer) Sync() error

func (WrappedWriteSyncer) Write added in v1.0.3

func (mws WrappedWriteSyncer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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