Documentation ¶
Index ¶
- Constants
- func AdjustMaxLogfileSize(size int, defaultSize int, path string) (int, error)
- type Error
- type Logger
- func (log *Logger) Debug(format string, a ...interface{})
- func (log *Logger) Dump(label string, a interface{})
- func (log *Logger) Error(format string, a ...interface{})
- func (log *Logger) Fatal(format string, a ...interface{})
- func (log *Logger) Info(format string, a ...interface{})
- func (log *Logger) Init(parameters Parameters) error
- func (log *Logger) IsLogging(level int) bool
- func (log *Logger) ParseDestinationsList(destinations string) ([]bool, bool)
- func (log *Logger) StackTrace()
- func (log *Logger) Status(format string, a ...interface{})
- func (log *Logger) Stop()
- func (log *Logger) Trace(format string, a ...interface{})
- func (log *Logger) Warning(format string, a ...interface{})
- type Parameters
Constants ¶
View Source
const ( NONE = 0 STATUS = 1 FATAL = 2 ERROR = 3 WARNING = 4 INFO = 5 DEBUG = 6 TRACE = 7 )
Log levels
View Source
const ( FILE = iota STDOUT SYSLOG GLOG )
Log destinations
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct { Tracing bool Logger *golog.Logger Level int MaxFileSize int64 MaxCompressedFilesNumber int CurrentFile *os.File Stdout bool Syslog io.Writer // contains filtered or unexported fields }
Logger information needed for a logger (or trace)
func (*Logger) IsLogging ¶
IsLogging checks if the logging level if higher or equal to the level parameter
func (*Logger) ParseDestinationsList ¶
ParseDestinationsList parses a list of destinations
func (*Logger) StackTrace ¶
func (log *Logger) StackTrace()
StackTrace will log the current stack trace
Click to show internal directories.
Click to hide internal directories.