Documentation ¶
Index ¶
Constants ¶
View Source
const (
TimeFormat = "15:04:05.000"
)
Logger is the opensvc specific zerolog logger
Variables ¶
View Source
var ( // WithCaller adds the file:line information of the logger caller WithCaller bool )
Functions ¶
func SetDefaultConsoleWriter ¶
func SetDefaultConsoleWriter(w zerolog.ConsoleWriter)
SetDefaultConsoleWriter set the default console writer
Types ¶
type Config ¶
type Config struct { // WithCaller includes the caller file:line to the records WithCaller bool // Enable console logging WithConsoleLog bool // Enable console logging coloring WithColor bool // LogFile makes the framework log to a file LogFile string // SessionLogFile logs to a per-sessionid file SessionLogFile string // Level is the minimum log record level to accept. // debug, info, warn[ing], error, fatal, panic Level string // MaxSize the max size in MB of the logfile before it's rolled MaxSize int // MaxBackups the max number of rolled files to keep MaxBackups int // MaxAge the max age in days to keep a logfile MaxAge int }
Config is the configuration of the zerolog logger and writers
Click to show internal directories.
Click to hide internal directories.