Documentation ¶
Index ¶
- Constants
- Variables
- func Alert(v ...interface{})
- func Alertf(format string, v ...interface{})
- func Critical(v ...interface{})
- func Criticalf(format string, v ...interface{})
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Emergency(v ...interface{})
- func Emergencyf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Notice(v ...interface{})
- func Noticef(format string, v ...interface{})
- func Panicf(format string, v ...interface{})
- func Panicln(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- type Fields
- type Logger
- func (logger *Logger) Alert(v ...interface{})
- func (logger *Logger) Alertf(format string, v ...interface{})
- func (logger *Logger) Critical(v ...interface{})
- func (logger *Logger) Criticalf(format string, v ...interface{})
- func (logger *Logger) Debug(v ...interface{})
- func (logger *Logger) Debugf(format string, v ...interface{})
- func (logger *Logger) Emergency(v ...interface{})
- func (logger *Logger) Emergencyf(format string, v ...interface{})
- func (logger *Logger) Error(v ...interface{})
- func (logger *Logger) Errorf(format string, v ...interface{})
- func (logger *Logger) Fatalf(format string, v ...interface{})
- func (logger *Logger) Fatalln(v ...interface{})
- func (logger *Logger) Info(v ...interface{})
- func (logger *Logger) Infof(format string, v ...interface{})
- func (logger *Logger) Log(priority Priority, v ...interface{})
- func (logger *Logger) Logf(priority Priority, format string, v ...interface{})
- func (logger *Logger) Notice(v ...interface{})
- func (logger *Logger) Noticef(format string, v ...interface{})
- func (logger *Logger) Panicf(format string, v ...interface{})
- func (logger *Logger) Panicln(v ...interface{})
- func (logger *Logger) Printf(format string, v ...interface{})
- func (logger *Logger) Println(v ...interface{})
- func (logger *Logger) Warning(v ...interface{})
- func (logger *Logger) Warningf(format string, v ...interface{})
- type Priority
- type Sink
Constants ¶
View Source
const AsyncBuffer = 100
Variables ¶
View Source
var BasicFields = []string{"time", "priority", "prefix", "message"}
View Source
var BasicFormat = "%s [%9s] %s- %s\n"
View Source
var RichFields = []string{"full_time", "priority", "seq", "prefix", "filename", "funcname", "lineno", "message"}
View Source
var RichFormat = "%s [%9s] %d %s - %s:%s:%d - %s\n"
Functions ¶
func Emergencyf ¶
func Emergencyf(format string, v ...interface{})
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is user-immutable immutable struct which can log to several outputs
func New ¶
New creates a new Logger which logs to all the supplied sinks. The prefix argument is passed to all loggers under the field "prefix" with every log message. If verbose is true, more expensive runtime fields will be computed and passed to loggers. These fields are funcname, lineno, pathname, and filename.
func (*Logger) Emergencyf ¶
func (*Logger) Log ¶
This function has an unusual name to aid in finding it while walking the stack. We need to do some dead reckoning from this function to access the caller's stack, so there is a consistent call depth above this function.
type Sink ¶
type Sink interface {
Log(Fields)
}
func JournalSink ¶
func JournalSink() Sink
func PriorityFilter ¶
Click to show internal directories.
Click to hide internal directories.