Documentation
¶
Overview ¶
Package logging handles the logging of information to the WACE log file.
Index ¶
- type LogLevel
- type Logging
- func (l *Logging) EndTransaction(transactionID string) []byte
- func (l *Logging) LoadLogger(logPath string, logLevel LogLevel) error
- func (l *Logging) LoadLoggerWriter(logBuffer io.Writer, logLevel LogLevel) error
- func (l *Logging) Printf(level LogLevel, format string, v ...interface{})
- func (l *Logging) Println(level LogLevel, msg string)
- func (l *Logging) StartTransaction(transactionID string)
- func (l *Logging) TPrintf(level LogLevel, transactionID, format string, v ...interface{})
- func (l *Logging) TPrintln(level LogLevel, transactionID, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevel ¶
type LogLevel int
LogLevel indicates the criticality of a message, either error, warning or debug.
func StringToLogLevel ¶
StringToLogLevel converts a string to the corresponding LogLevel value
type Logging ¶
type Logging struct {
// contains filtered or unexported fields
}
The Logging struct holds the configured logged information.
func (*Logging) EndTransaction ¶
EndTransaction returns the logging buffer for the transaction
func (*Logging) LoadLogger ¶
LoadLogger loads the logging file and sets up everything for the logging inside the log file
func (*Logging) LoadLoggerWriter ¶
LoadLoggerWriter sets up everything for the logging inside the given buffer
func (*Logging) Printf ¶
Printf writes a message to the log if the given level is lower than the configured max level. Arguments are handled as in fmt.Printf.
func (*Logging) Println ¶
Println writes a message to the log if the given level is lower than the configured max level.
func (*Logging) StartTransaction ¶
StartTransaction creates a new buffer to log transaction information to eventually send to the WAF.
func (*Logging) TPrintf ¶
TPrintf writes a level message to the log and transaction buffer. It only writes to the log if the level is lower than the configured max level. It only writes ERROR and WARN messages to the transaction buffer. Arguments are handled as in fmt.Printf.