logging

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug logs a debug message.

func Debugf

func Debugf(template string, args ...interface{})

Debugf logs a formatted debug message.

func Error

func Error(args ...interface{})

Error logs an error message.

func Errorf

func Errorf(template string, args ...interface{})

Errorf logs a formatted error message.

func Get

func Get() *zap.SugaredLogger

Get returns the global logger. If Init hasn't been called, it returns a no-op logger.

func Info

func Info(args ...interface{})

Info logs an info message.

func Infof

func Infof(template string, args ...interface{})

Infof logs a formatted info message.

func Init

func Init(level Level)

Init initializes the global logger with the specified level. This should be called once at application startup.

func Warn

func Warn(args ...interface{})

Warn logs a warning message.

func Warnf

func Warnf(template string, args ...interface{})

Warnf logs a formatted warning message.

Types

type Level

type Level string

Level represents log levels.

const (
	LevelDebug Level = "debug"
	LevelInfo  Level = "info"
	LevelWarn  Level = "warn"
	LevelError Level = "error"
)

Jump to

Keyboard shortcuts

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