logger

package
v0.0.0-...-8d2fb77 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOGGER_API_RESPONSE_TIME     = "api_response_time"
	LOGGER_API_APP_PANIC         = "api_app_panic"
	LOGGER_API_APP_ERROR         = "api_app_error"
	LOGGER_API_APP_REQUEST_ERROR = "api_app_request_error"
)

Variables

This section is empty.

Functions

func Debug

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

func Error

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

func Fatal

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

func Info

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

func Logger

func Logger() *zap.Logger

func NewLogger

func NewLogger(appName string, env string, logPath string, stdout bool)

func Panic

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

func Sync

func Sync() error

func WrapCaptureError

func WrapCaptureError(err error, fields ...zap.Field) error

func WrapError

func WrapError(category string, err error, fields ...zap.Field) error

Types

type TracerData

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

func NewTracerData

func NewTracerData() *TracerData

func (*TracerData) Add

func (d *TracerData) Add(key string, data interface{}) *TracerData

func (TracerData) Data

func (d TracerData) Data() interface{}

Jump to

Keyboard shortcuts

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