Documentation
¶
Index ¶
- Variables
- func AddGlobalFilter(filter Filter)
- func Errorf(format string, args ...interface{})
- func FilterString(msg string) string
- func Flush()
- func Infof(format string, args ...interface{})
- func InitLogging(logToStderr bool, verbose int, logFlow bool)
- func Warningf(format string, args ...interface{})
- type Filter
- type VerboseLogger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogToStderr = false // true if logging is being redirected to stderr. Verbose = 0 // >0 if verbose logging is enabled at a particular level. LogFlow = false // true to flow logging settings to child processes. )
Functions ¶
func AddGlobalFilter ¶
func AddGlobalFilter(filter Filter)
func FilterString ¶
func InitLogging ¶
InitLogging ensures the logging library has been initialized with the given settings.
Types ¶
type Filter ¶
func CreateFilter ¶
type VerboseLogger ¶
VerboseLogger logs messages only if verbosity matches the level it was built with.
It may be used as a boolean to check if it's enabled.
if log := logging.V(lvl); log { log.Infoln(expensiveComputation()) }
func V ¶
func V(level glog.Level) VerboseLogger
V builds a logger that logs messages only if verbosity is at least at the provided level.
func (VerboseLogger) Info ¶
func (v VerboseLogger) Info(args ...interface{})
Info is equivalent to the global Info function, guarded by the value of v. See the documentation of V for usage.
func (VerboseLogger) Infof ¶
func (v VerboseLogger) Infof(format string, args ...interface{})
Infof is equivalent to the global Infof function, guarded by the value of v. See the documentation of V for usage.
func (VerboseLogger) Infoln ¶
func (v VerboseLogger) Infoln(args ...interface{})
Infoln is equivalent to the global Infoln function, guarded by the value of v. See the documentation of V for usage.
Click to show internal directories.
Click to hide internal directories.