Documentation ¶
Index ¶
- Constants
- func Alert(s ...string) error
- func Apply(c LogConfig) error
- func Close() error
- func Crit(s ...string) error
- func Debug(s ...string) error
- func Emerg(s ...string) error
- func Err(s ...string) error
- func Info(s ...string) error
- func Notice(s ...string) error
- func Warn(s ...string) error
- func Write(b []byte, s LogSeverity) error
- func WriteString(s LogSeverity, m ...string) error
- type LogConfig
- type LogFacility
- type LogSeverity
- type LogTarget
- type Logger
- type LoggerNotAvailable
Constants ¶
View Source
const ( LogSeverityEmerg LogSeverity = "emergency" LogSeverityAlert = "alert" LogSeverityCrit = "critical" LogSeverityErr = "error" LogSeverityWarn = "warning" LogSeverityNotice = "notice" LogSeverityInfo = "info" LogSeverityDebug = "debug" )
View Source
const ( LogFacilityKern LogFacility = "kern" LogFacilityUser = "user" LogFacilityMail = "mail" LogFacilityDaemon = "daemon" LogFacilityAuth = "auth" LogFacilitySyslog = "syslog" LogFacilityLPR = "lpr" LogFacilityNews = "news" LogFacilityUUCP = "uucp" LogFacilityCron = "cron" LogFacilityAuthPriv = "authpriv" LogFacilityFTP = "ftp" LogFacilityLocal0 = "local0" LogFacilityLocal1 = "local1" LogFacilityLocal2 = "local2" LogFacilityLocal3 = "local3" LogFacilityLocal4 = "local4" LogFacilityLocal5 = "local5" LogFacilityLocal6 = "local6" LogFacilityLocal7 = "local7" )
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(b []byte, s LogSeverity) error
func WriteString ¶
func WriteString(s LogSeverity, m ...string) error
Types ¶
type LogConfig ¶
type LogConfig struct { Target LogTarget `xml:"target"` File string `xml:"file"` SyslogAddress string `xml:"address"` SyslogTag string `xml:"tag"` Severity LogSeverity `xml:"severity"` Facility LogFacility `xml:"facility"` }
type LogFacility ¶
type LogFacility string
func (LogFacility) Priority ¶
func (l LogFacility) Priority() syslog.Priority
type LogSeverity ¶
type LogSeverity string
func (LogSeverity) Bigger ¶
func (l LogSeverity) Bigger(r LogSeverity) bool
func (LogSeverity) BiggerOrEqual ¶
func (l LogSeverity) BiggerOrEqual(r LogSeverity) bool
func (LogSeverity) Equal ¶
func (l LogSeverity) Equal(r LogSeverity) bool
func (LogSeverity) Lower ¶
func (l LogSeverity) Lower(r LogSeverity) bool
func (LogSeverity) LowerOrEqual ¶
func (l LogSeverity) LowerOrEqual(r LogSeverity) bool
func (LogSeverity) Priority ¶
func (l LogSeverity) Priority() syslog.Priority
type LogTarget ¶
type LogTarget string
const LogTargetFile LogTarget = "file"
const LogTargetSyslog LogTarget = "syslog"
type Logger ¶
type Logger interface { Close() error Emerg(s ...string) error Alert(s ...string) error Crit(s ...string) error Err(s ...string) error Warn(s ...string) error Notice(s ...string) error Info(s ...string) error Debug(s ...string) error Write(b []byte, s LogSeverity) error WriteString(s LogSeverity, m ...string) error }
type LoggerNotAvailable ¶
type LoggerNotAvailable struct{}
func (LoggerNotAvailable) Error ¶
func (e LoggerNotAvailable) Error() string
Click to show internal directories.
Click to hide internal directories.