Categorygithub.com/liasece/log
modulepackage
0.0.3
Repository: https://github.com/liasece/log.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

Any takes a key and an arbitrary value and chooses the best way to represent them as a field, falling back to a reflection-based approach only if necessary.
Binary constructs a field that carries an opaque binary blob.
Bool constructs a field that carries a bool.
Boolp constructs a field that carries a *bool.
ByteString constructs a field that carries UTF-8 encoded text as a []byte.
Complex128 constructs a field that carries a complex number.
Complex128p constructs a field that carries a *complex128.
Complex64 constructs a field that carries a complex number.
Complex64p constructs a field that carries a *complex64.
Debug logs a message at DebugLevel.
DPanic logs a message at DPanicLevel.
Duration constructs a field with the given key and value.
Durationp constructs a field that carries a *time.Duration.
Error logs a message at ErrorLevel.
ErrorField is shorthand for the common idiom NamedError("error", err).
Fatal logs a message at FatalLevel.
Float32 constructs a field that carries a float32.
Float32p constructs a field that carries a *float32.
Float64 constructs a field that carries a float64.
Float64p constructs a field that carries a *float64.
FlushSentry flush sentry, call before process exit.
Info logs a message at InfoLevel.
InitLog Init logging.
InitLogByLevel Init logging.
InitSentry initialize sentry client and log sentry hook.
Int constructs a field with the given key and value.
Int16 constructs a field with the given key and value.
Int16p constructs a field that carries a *int16.
Int32 constructs a field with the given key and value.
Int32p constructs a field that carries a *int32.
Int64 constructs a field with the given key and value.
Int64p constructs a field that carries a *int64.
Int8 constructs a field with the given key and value.
Int8p constructs a field that carries a *int8.
Intp constructs a field that carries a *int.
L return global logger.
NamedError constructs a field that lazily stores err.Error() under the provided key.
Namespace creates a named, isolated scope within the logger's context.
Object constructs a field with the given key and ObjectMarshaler.
Panic logs a message at PanicLevel.
RecoverWithSentry capture panic and send to sentry.
Reflect constructs a field with the given key and an arbitrary object.
Skip constructs a no-op field, which is often useful when handling invalid inputs in other Field constructors.
Stack constructs a field that stores a stacktrace of the current goroutine under provided key.
String constructs a field with the given key and value.
Stringer constructs a field with the given key and the output of the value's String method.
Stringp constructs a field that carries a *string.
Strings constructs a field that carries a slice of strings.
Sync flushes buffered logs (if any).
Time constructs a Field with the given key and value.
Uint constructs a field with the given key and value.
Uint16 constructs a field with the given key and value.
Uint16p constructs a field that carries a *uint16.
Uint32 constructs a field with the given key and value.
Uint32p constructs a field that carries a *uint32.
Uint64 constructs a field with the given key and value.
Uint64p constructs a field that carries a *uint64.
Uint8 constructs a field with the given key and value.
Uint8p constructs a field that carries a *uint8.
Uintp constructs a field that carries a *uint.
Uintptr constructs a field with the given key and value.
Uintptrp constructs a field that carries a *uintptr.
Warn logs a message at WarnLevel.
With creates a child logger and adds structured context to it.