Documentation ¶
Overview ¶
Package setup provides simple helpers for configuring spacelog from flags.
This package adds the following flags:
--log.output - can either be stdout, stderr, syslog, or a file path --log.level - the base logger level --log.filter - loggers that match this regular expression get set to the lowest level --log.format - a go text template for log lines --log.stdlevel - the logger level to assume the standard library logger is using --log.subproc - a process to run for stdout/stderr capturing --log.buffer - the number of message to buffer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustSetup ¶
func MustSetup(procname string)
MustSetup calls spacelog.MustSetup with a flag-configured config struct It's pretty useless to call this method without parsing flags first, via flagfile.Load()
func MustSetupWithFacility ¶
func MustSetupWithFacility(procname string, facility spacelog.SyslogPriority)
MustSetupWithFacility is deprecated and will be removed soon. Please configure facility through the facility flag option.
func SetFormatMethod ¶
func SetFormatMethod(name string, fn interface{})
SetFormatMethod in this subpackage is deprecated and will be removed soon. Please see spacelog.SetFormatMethod instead
func Setup ¶
Setup calls spacelog.Setup with a flag-configured config struct It's pretty useless to call this method without parsing flags first, via flagfile.Load()
func SetupWithFacility ¶
func SetupWithFacility(procname string, facility spacelog.SyslogPriority) error
SetupWithFacility is deprecated and will be removed soon. Please configure facility through the facility flag option.
Types ¶
This section is empty.