logger

package
v1.2.96 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 6 Imported by: 8

Documentation

Overview

Package logger Logger implementation based on zap log package (https://github.com/uber-go/zap)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, params ...any)

Debug log level

func EnableJsonFormat added in v1.1.2

func EnableJsonFormat(value bool)

EnableJsonFormat configure log output as json (true) or text line (false)

func EnableStacktrace added in v1.1.2

func EnableStacktrace(value bool)

EnableStacktrace configure log output to include or exclude stack trace

func Error

func Error(format string, params ...any)

Error log level

func Fatal

func Fatal(format string, params ...any)

Fatal log level

func Info

func Info(format string, params ...any)

Info log level

func Init added in v1.1.2

func Init()

Init initialize logger

func SetLevel added in v1.1.2

func SetLevel(level string)

SetLevel log level DEBUG | INFO | WARN | ERROR

func SetTimeLayout added in v1.1.2

func SetTimeLayout(layout string)

SetTimeLayout define the log entry time layout

func Warn

func Warn(format string, params ...any)

Warn log level

Types

This section is empty.

Jump to

Keyboard shortcuts

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