Documentation ¶
Overview ¶
Example ¶
Init("example", SeverityNotice, "") // Call flag.Parse() around that time Info("Application is starting") Debugf("Counter value: %d", 0) Fatal("Kaboom")
Output:
Index ¶
- Variables
- func Critical(message interface{})
- func Criticalf(format string, args ...interface{})
- func Debug(message interface{})
- func Debugf(format string, args ...interface{})
- func Error(message interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(message interface{})
- func Fatalf(format string, args ...interface{})
- func GetFileDescriptor() *os.File
- func Info(message interface{})
- func Infof(format string, args ...interface{})
- func Init(appName string, logLevel Severity, syslogFacility string) error
- func Notice(message interface{})
- func Noticef(format string, args ...interface{})
- func SetFileDescriptor(fd *os.File)
- func SetLogLevel(logLevel Severity)
- func TruncateLogFile(value bool)
- func UseLogFile(fileName string)
- func UseSyslog(value bool)
- func Warn(message interface{})
- func Warnf(format string, args ...interface{})
- type Severity
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SeverityName = []string{ SeverityDebug: "DEBUG", SeverityInfo: "INFO", SeverityNotice: "NOTICE", SeverityWarning: "WARNING", SeverityError: "ERROR", SeverityCritical: "CRITICAL", SeverityFatal: "FATAL", }
Functions ¶
func GetFileDescriptor ¶
func SetFileDescriptor ¶
func SetLogLevel ¶
func SetLogLevel(logLevel Severity)
func TruncateLogFile ¶
func TruncateLogFile(value bool)
func UseLogFile ¶
func UseLogFile(fileName string)
Types ¶
Click to show internal directories.
Click to hide internal directories.