Documentation
¶
Overview ¶
Package xlog is a simple wrapper for slog, it will create a slog.Logger with options
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // Env will change the log output format, if Env is "local", log will output in text format, otherwise in json format Env string // Debug will change the log level to debug Debug bool // SlackToken is the Slack bot token, if it is set and SlackChannel exists, Warn and Error level will send to it SlackToken string // SlackChannel is the Slack channel id, if it is set and SlackToken exists, Warn and Error level will send to it SlackChannel string // Release is the release version of the service, it will be added to log fields Release string // ServiceName is the name of the service, it will be added to log fields ServiceName string }
Options is the options for xlog, all options are optional
Click to show internal directories.
Click to hide internal directories.