log

package module
v0.0.0-...-12ca06f Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 4 Imported by: 0

README

go zap log开箱即用

Installation

go get github.com/hiifong/log

Usage

log.Debug(...)
log.Info(...)
log.Error(...)
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...zap.Field)

Debug ...

func Debugf

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

Debugf ...

func Default

func Default() *zap.Logger

Default default logger

func Error

func Error(msg string, fields ...zap.Field)

Error ...

func Errorf

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

Errorf ...

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf ...

func Info

func Info(msg string, fields ...zap.Field)

Info ...

func Infof

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

Infof ...

func Logger

func Logger() *zap.Logger

Logger return a default logger

func Panic

func Panic(msg string, fields ...zap.Field)

Panic ...

func SetDefault

func SetDefault(logger *zap.Logger)

SetDefault set a default logger

func Sync

func Sync()

Sync call zap logger Sync

func Warn

func Warn(msg string, fields ...zap.Field)

Warn ...

func Warnf

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

Warnf ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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