Documentation ¶
Overview ¶
Package console provides a simple interface for logging things to stdout & a log file
Index ¶
- Constants
- type Config
- type Console
- func (l *Console) Close()
- func (l *Console) Debug(format string, a ...interface{})
- func (l *Console) Error(format string, a ...interface{})
- func (l *Console) ErrorDesc(desc string, err error)
- func (l *Console) Fatal(format string, a ...interface{})
- func (l *Console) Info(format string, a ...interface{})
- func (l *Console) Rotate(destinationDir string) error
- func (l *Console) Warn(format string, a ...interface{})
Constants ¶
View Source
const ( // LevelDebug debug level includes debugging information and is very verbose LevelDebug = 3 // LevelInfo informational messages for normal operation of the application LevelInfo = 2 // LevelWarn warning messages for potential issues LevelWarn = 1 // LevelError error messages for problems LevelError = 0 // LevelNone no messages LevelNone = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Path the path to where the log file should live. // omit this to disable logging to a file. Path string // WriteLevel the log level that events must be at least before they // are written to the log file. WriteLevel int // PrintLevel the log level that events must be at least before they // are written to console. PrintLevel int }
Config describes the configuration for a console session
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
Console describes a log object
func (*Console) Debug ¶
Debug print debug information to the console if verbose logging is enabled Safe to call with sensitive data, but verbose logging should not be enabled on production instances
Click to show internal directories.
Click to hide internal directories.