Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultFlags are passed to the default console log.Logger DefaultFlags = log.Ldate | log.Ltime | log.Lmicroseconds | log.Lshortfile // SyslogFlags are passed to the default syslog log.Logger SyslogFlags = log.Lshortfile // SyslogPriority for the default syslog log.Logger SyslogPriority = syslog.LOG_DEBUG | syslog.LOG_USER )
Variables ¶
View Source
var NullLogger = nullLogger{}
NullLogger is a logger that does nothing
Functions ¶
Types ¶
type ConsoleLog ¶
type ConsoleLog struct {
// contains filtered or unexported fields
}
ConsoleLog sends Notices to a log.Logger and Debugs to syslog
func NewConsoleLog ¶
func NewConsoleLog(w io.Writer, flag int) (*ConsoleLog, error)
NewConsoleLog creates a ConsoleLog with a log.Logger using the given io.Writer and flag, and a syslog.Writer.
func (*ConsoleLog) Notice ¶
func (l *ConsoleLog) Notice(msg string)
Notice alerts the user about something, as well as putting it syslog
Click to show internal directories.
Click to hide internal directories.