Documentation ¶
Index ¶
- Constants
- Variables
- func GetLevel() log.Leveldeprecated
- func GetLogger(ctx context.Context) *log.Entrydeprecated
- func SetFormat(format OutputFormat) errordeprecated
- func SetLevel(level string) errordeprecated
- func WithLogger(ctx context.Context, logger *log.Entry) context.Contextdeprecated
- type Entrydeprecated
- type Fieldsdeprecated
- type Leveldeprecated
- type OutputFormatdeprecated
Constants ¶
View Source
const ( // TextFormat represents the text logging format. // // Deprecated: use [log.TextFormat]. TextFormat log.OutputFormat = "text" // JSONFormat represents the JSON logging format. // // Deprecated: use [log.JSONFormat]. JSONFormat log.OutputFormat = "json" )
Supported log output formats.
View Source
const RFC3339NanoFixed = log.RFC3339NanoFixed
RFC3339NanoFixed is time.RFC3339Nano with nanoseconds padded using zeros to ensure the formatted time is always the same number of characters.
Deprecated: use log.RFC3339NanoFixed.
Variables ¶
View Source
var G = log.G
G is a shorthand for GetLogger.
Deprecated: use log.G.
View Source
var L = log.L
L is an alias for the standard logger.
Deprecated: use log.L.
Functions ¶
func GetLevel
deprecated
added in
v1.6.22
func SetFormat
deprecated
added in
v1.6.22
func SetFormat(format OutputFormat) error
SetFormat sets the log output format.
Deprecated: use log.SetFormat.
func SetLevel
deprecated
added in
v1.6.22
SetLevel sets log level globally. It returns an error if the given level is not supported.
Deprecated: use log.SetLevel.
func WithLogger
deprecated
Types ¶
type Fields
deprecated
added in
v1.6.22
type Level
deprecated
added in
v1.6.22
Level is a logging level.
Deprecated: use log.Level.
const ( // TraceLevel level. // // Deprecated: use [log.TraceLevel]. TraceLevel Level = log.TraceLevel // DebugLevel level. // // Deprecated: use [log.DebugLevel]. DebugLevel Level = log.DebugLevel // InfoLevel level. // // Deprecated: use [log.InfoLevel]. InfoLevel Level = log.InfoLevel // WarnLevel level. // // Deprecated: use [log.WarnLevel]. WarnLevel Level = log.WarnLevel // ErrorLevel level // // Deprecated: use [log.ErrorLevel]. ErrorLevel Level = log.ErrorLevel // FatalLevel level. // // Deprecated: use [log.FatalLevel]. FatalLevel Level = log.FatalLevel // PanicLevel level. // // Deprecated: use [log.PanicLevel]. PanicLevel Level = log.PanicLevel )
Supported log levels.
type OutputFormat
deprecated
added in
v1.6.24
type OutputFormat = log.OutputFormat
OutputFormat specifies a log output format.
Deprecated: use log.OutputFormat.
Click to show internal directories.
Click to hide internal directories.