modulepackage
0.0.0-20220809183014-82ef2a900169
Repository: https://github.com/joematpal/go-logger.git
Documentation: pkg.go.dev
# README
go-logger
Options
Logging Levels: info, want, errors, dpanic, panic, fatal
Environments: dev, prod
Log Encoding: json, console
Log Stacktrace: true, false
Logging Levels
info: InfoLevel is the default logging priority.
warn: WarnLevel logs are more important than Info, but don't need individual
human review.
error: ErrorLevel logs are high-priority. If an application is running smoothly,
it shouldn't generate any error-level logs.
dpanic: DPanicLevel logs are particularly important errors. In development the
logger panics after writing the message.
panic: PanicLevel logs a message, then panics.
fatal: FatalLevel logs a message, then calls os.Exit(1).
INFO:
- code options can be found in options.go
- enum values can be found in enums.go
- flags can be found in flags/logger.go
# Functions
GetCorrelationIDFromMetadata will get the correlation_id from grpc context makes a new one if not present, but will still return an error.
No description provided by the author
No description provided by the author
No description provided by the author
Deprecated: NewCorrelationLogger is deprecated; use New they do the same thing.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
DPanicLevel logs are particularly important errors.
ErrorLevel logs are high-priority.
FatalLevel logs a message, then calls os.Exit(1).
InfoLevel is the default logging priority.
No description provided by the author
PanicLevel logs a message, then panics.
No description provided by the author
WarnLevel logs are more important than Info, but don't need individual human review.
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Logger represent common interface for logging function.
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author