logging

package
v0.0.0-...-f5de34e Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(s string)

func Error

func Error(s string)

func Info

func Info(s string)

func Panic

func Panic(s string)

func Warn

func Warn(s string)

Types

type FieldKey

type FieldKey string

func (FieldKey) String

func (f FieldKey) String() string

type ILog

type ILog interface {
	Field(k FieldKey, v string) ILog
	Fields(m map[FieldKey]string) ILog

	Debug(s string)
	Info(s string)
	Warn(s string)
	Error(s string)
	Panic(s string)
}

func Field

func Field(k FieldKey, v string) ILog

func Fields

func Fields(m map[FieldKey]string) ILog

func Init

func Init(logger *zap.Logger) ILog

func Log

func Log() ILog

func NewLog

func NewLog(l *zap.Logger) ILog

type ZapLogger

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

func (*ZapLogger) Debug

func (z *ZapLogger) Debug(s string)

func (*ZapLogger) Error

func (z *ZapLogger) Error(s string)

func (*ZapLogger) Field

func (z *ZapLogger) Field(k FieldKey, v string) ILog

func (*ZapLogger) Fields

func (z *ZapLogger) Fields(m map[FieldKey]string) ILog

func (*ZapLogger) Info

func (z *ZapLogger) Info(s string)

func (*ZapLogger) Panic

func (z *ZapLogger) Panic(s string)

func (*ZapLogger) Warn

func (z *ZapLogger) Warn(s string)

Jump to

Keyboard shortcuts

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