Documentation ¶
Overview ¶
log is a drop-in replacement for seelog that allows you to add a source and context to your logging messages.
Index ¶
- Variables
- func Critical(v ...interface{}) error
- func Criticalf(format string, params ...interface{}) error
- func Debug(v ...interface{})
- func Debugf(format string, params ...interface{})
- func Disable()
- func Error(v ...interface{}) error
- func Errorf(format string, params ...interface{}) error
- func Flush()
- func Info(v ...interface{})
- func Infof(format string, params ...interface{})
- func Trace(v ...interface{})
- func Tracef(format string, params ...interface{})
- func Warn(v ...interface{}) error
- func Warnf(format string, params ...interface{}) error
- type Context
- func (c *Context) AddContext(topics ...string)
- func (c *Context) Critical(v ...interface{}) error
- func (c *Context) Criticalf(format string, params ...interface{}) error
- func (c *Context) Debug(v ...interface{})
- func (c *Context) Debugf(format string, params ...interface{})
- func (c *Context) Error(v ...interface{}) error
- func (c *Context) Errorf(format string, params ...interface{}) error
- func (c *Context) Flush()
- func (c *Context) Info(v ...interface{})
- func (c *Context) Infof(format string, params ...interface{})
- func (c *Context) NewContext(topics ...string) *Context
- func (c *Context) Trace(v ...interface{})
- func (c *Context) Tracef(format string, params ...interface{})
- func (c *Context) Warn(v ...interface{}) error
- func (c *Context) Warnf(format string, params ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
var Source string
Functions ¶
func Critical ¶
func Critical(v ...interface{}) error
Critical formats message using the default formats for its operands and writes to default logger with log level = Critical
func Criticalf ¶
Criticalf formats message according to format specifier and writes to default logger with log level = Critical
func Debug ¶
func Debug(v ...interface{})
Debug formats message using the default formats for its operands and writes to default logger with log level = Debug
func Debugf ¶
func Debugf(format string, params ...interface{})
Debugf formats message according to format specifier and writes to default logger with log level = Debug.
func Error ¶
func Error(v ...interface{}) error
Error formats message using the default formats for its operands and writes to default logger with log level = Error
func Errorf ¶
Errorf formats message according to format specifier and writes to default logger with log level = Error
func Flush ¶
func Flush()
Flush immediately processes all currently queued messages and all currently buffered messages. It is a blocking call which returns only after the queue is empty and all the buffers are empty.
If Flush is called for a synchronous logger (type='sync'), it only flushes buffers (e.g. '<buffered>' receivers) , because there is no queue.
Call this method when your app is going to shut down not to lose any log messages.
func Info ¶
func Info(v ...interface{})
Info formats message using the default formats for its operands and writes to default logger with log level = Info
func Infof ¶
func Infof(format string, params ...interface{})
Infof formats message according to format specifier and writes to default logger with log level = Info.
func Trace ¶
func Trace(v ...interface{})
Trace formats message using the default formats for its operands and writes to default logger with log level = Trace
func Tracef ¶
func Tracef(format string, params ...interface{})
Tracef formats message according to format specifier and writes to default logger with log level = Trace.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func (*Context) AddContext ¶
func (*Context) Critical ¶
Critical formats message using the default formats for its operands and writes to default logger with log level = Critical Returns an error without the context decoration
func (*Context) Criticalf ¶
Criticalf formats message according to format specifier and writes to default logger with log level = Critical Returns an error without the context decoration
func (*Context) Debug ¶
func (c *Context) Debug(v ...interface{})
Debug formats message using the default formats for its operands and writes to default logger with log level = Debug
func (*Context) Debugf ¶
Debugf formats message according to format specifier and writes to default logger with log level = Debug.
func (*Context) Error ¶
Error formats message using the default formats for its operands and writes to default logger with log level = Error Returns an error without the context decoration
func (*Context) Errorf ¶
Errorf formats message according to format specifier and writes to default logger with log level = Error Returns an error without the context decoration
func (*Context) Flush ¶
func (c *Context) Flush()
Call this method when your app is going to shut down not to lose any log messages.
func (*Context) Info ¶
func (c *Context) Info(v ...interface{})
Info formats message using the default formats for its operands and writes to default logger with log level = Info
func (*Context) Infof ¶
Infof formats message according to format specifier and writes to default logger with log level = Info.
func (*Context) NewContext ¶
func (*Context) Trace ¶
func (c *Context) Trace(v ...interface{})
Trace formats message using the default formats for its operands and writes to default logger with log level = Trace
func (*Context) Tracef ¶
Tracef formats message according to format specifier and writes to default logger with log level = Trace.