Documentation ¶
Index ¶
Constants ¶
View Source
const ( LogTargetFile = "file" LogTargetStderr = "stderr" )
Variables ¶
This section is empty.
Functions ¶
func CloseLogging ¶ added in v1.31.0
func CloseLogging() error
func New ¶ added in v1.32.0
func New(category, name, alias string) *logger
New creates a new logging instance to be used in models
func RedirectLogging ¶ added in v1.32.0
func SetupLogging ¶
SetupLogging configures the logging output.
Types ¶
type Config ¶ added in v1.31.0
type Config struct { // will set the log level to DEBUG Debug bool // will set the log level to ERROR Quiet bool // format and target of log messages LogTarget string LogFormat string Logfile string // will rotate when current file at the specified time interval RotationInterval time.Duration // will rotate when current file size exceeds this parameter. RotationMaxSize int64 // maximum rotated files to keep (older ones will be deleted) RotationMaxArchives int // pick a timezone to use when logging. or type 'local' for local time. LogWithTimezone string // Logger instance name InstanceName string // Structured logging message key StructuredLogMessageKey string // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.