diff --git a/log/static.go b/log/static/static.go similarity index 73% rename from log/static.go rename to log/static/static.go index c5afc9b..f6951ad 100644 --- a/log/static.go +++ b/log/static/static.go @@ -1,14 +1,20 @@ -package log +// Package static provides a simple static logger implementation for easy migration of existing pre-v2 code. +// +// The package is usually imported aliased as "log" to be compatible with the v1 approach. +// +// The static logger instance needs to be initialized during startup of the application using SetLogger. +package static import ( "sync" + "github.com/ViaQ/logerr/v2/log" "github.com/go-logr/logr" ) var ( lock sync.RWMutex - logger = NewLogger("uninitialized") + logger = log.NewLogger("uninitialized") ) // SetLogger sets the static logger instance.