package logging
import "github.com/oslokommune/okctl/pkg/logging"
Package logging API for structured logging
Index ¶
- func AddLogFileHook(logger *logrus.Logger, logFile string) error
- func InitLogger(logFile string) error
- type Logger
Functions ¶
func AddLogFileHook ¶
AddLogFileHook Add a Hook to write logs to rotating log files
func InitLogger ¶
InitLogger initialize the global logger instance
Types ¶
type Logger ¶
type Logger interface { Trace(msg string) Debug(msg string) Info(msg string) Warn(msg string) Error(msg string) WithField(key string, value interface{}) Logger }
Logger Interface for structured logging
func GetLogger ¶
GetLogger returns a logger with the given component and activity as context fields on all log entries
Source Files ¶
api.go logrus.go noop-logger.go types.go
- Version
- v0.0.106 (latest)
- Published
- Oct 21, 2022
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 18 hours ago –
Tools for package owners.