Documentation
¶
Index ¶
- Variables
- func Configure(config *logcfg.Config, extra ...string) error
- func ErrorMessage(err error) *string
- func Logger(messageContext ...logging.MessageContext) logging.Logger
- func NewBufferedContext() (logging.Context, *bytes.Buffer)
- func NewDefaultContext() logging.Context
- func SetContext(ctx logging.Context)
- type LogProvider
- type StaticContext
Constants ¶
This section is empty.
Variables ¶
View Source
var REALM = logging.NewRealm("ocm")
REALM is used to tag all logging done by this library with the ocm tag. This is also used as message context to configure settings for all log output provided by this library.
Functions ¶
func Configure ¶
Configure applies configuration for the default log context provided by this package.
func ErrorMessage ¶
func Logger ¶
func Logger(messageContext ...logging.MessageContext) logging.Logger
Logger determines a default logger for this given message context based on the rule settings for this library.
func NewDefaultContext ¶
func SetContext ¶
SetContext sets a new precondigure context. This function should be called prior to any configuration to avoid loosing them.
Types ¶
type LogProvider ¶
type LogProvider interface { logging.ContextProvider Logger(messageContext ...logging.MessageContext) logging.Logger }
type StaticContext ¶
func Context ¶
func Context() *StaticContext
Context returns the default logging configuration used for this library.
func NewContext ¶
func NewContext(ctx logging.Context) *StaticContext
Click to show internal directories.
Click to hide internal directories.