Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute interface { Key() string Value() interface{} }
Attribute is an interface that a property that can be written into a log message must have in order to do so.
type Extractor ¶
Extractor is an interface that a plugin can implement to provide an API allowing the service extract content from its context to add them into log messages.
type Logger ¶
type Logger interface { // Debug outputs messages using debug level. Debug(ctx context.Context, msg string, attrs ...Attribute) // Internal outputs messages using the internal level. Internal(ctx context.Context, msg string, attrs ...Attribute) // Info outputs messages using the info level. Info(ctx context.Context, msg string, attrs ...Attribute) // Warn outputs messages using warning level. Warn(ctx context.Context, msg string, attrs ...Attribute) // Error outputs messages using error level. Error(ctx context.Context, msg string, attrs ...Attribute) // Fatal outputs message using fatal level. Fatal(ctx context.Context, msg string, attrs ...Attribute) // SetLogLevel changes the current messages log level. SetLogLevel(level string) (string, error) // Level gets the current log level. Level() string }
Logger is the log interface that is available for all services to show messages using different levels.
Click to show internal directories.
Click to hide internal directories.