Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Format string // json, text, csv
Level int // 100: DEBUG, 200: INFO, 300: NOTICE, 400: WARNING, 500: ERROR, 502: CRITICAL, 509: ALERT
Output string // stdout, <filepath>, none
}
Config represents the configuration for the logger.
type Log ¶
type Log struct {
Timestamp string `json:"timestamp"`
Severity string `json:"severity"`
Path string `json:"path"`
Line int `json:"line"`
Error
}
Log represents a log entry.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger represents a logger instance.
func (Logger) ErrorF ¶
ErrorF logs an error message with the given status code and arguments. It returns an error object.
func (Logger) ErrorFatal ¶ added in v1.0.4
ErrorFatal logs an error message and exits the program
Click to show internal directories.
Click to hide internal directories.