Documentation ¶
Index ¶
- Constants
- func New(isDebug bool) log_api.Logger
- func NewForService(serviceName string, isDebug bool) log_api.Logger
- func NewWithOptions(outputBuffer io.Writer, prefix string, isDebug bool) log_api.Logger
- type Logger
- func (logger *Logger) CopyWith(prefix string, isDebug bool) log_api.Logger
- func (logger *Logger) Debug(args ...interface{})
- func (logger *Logger) DebugEnabled() bool
- func (logger *Logger) Debugf(format string, args ...interface{})
- func (logger *Logger) Debugln(args ...interface{})
- func (logger *Logger) Error(args ...interface{})
- func (logger *Logger) Errorf(format string, args ...interface{})
- func (logger *Logger) Errorln(args ...interface{})
- func (logger *Logger) Info(args ...interface{})
- func (logger *Logger) Infof(format string, args ...interface{})
- func (logger *Logger) Infoln(args ...interface{})
- func (logger *Logger) Panic(args ...interface{})
- func (logger *Logger) Panicf(format string, args ...interface{})
- func (logger *Logger) Panicln(args ...interface{})
- func (logger *Logger) Prefix() string
- func (logger *Logger) Warn(args ...interface{})
- func (logger *Logger) Warnf(format string, args ...interface{})
- func (logger *Logger) Warnln(args ...interface{})
Constants ¶
const ( // DebugSeverity indicates a debug logging message DebugSeverity severity = iota // InfoSeverity indicates an informational logging message InfoSeverity // WarnSeverity indicates a warning logging message WarnSeverity // ErrorSeverity indicates a critical severity logging message ErrorSeverity // PanicSeverity indicates a severity logging message that is unliekly to be // recovered from PanicSeverity )
Variables ¶
This section is empty.
Functions ¶
func NewForService ¶
NewForService method instantiates a new logger that includes information about the service itself.
Types ¶
type Logger ¶
type Logger struct { BackingLogger *stdlib_log.Logger IsDebug bool // contains filtered or unexported fields }
Logger is the main logging object that can be used to log messages to stdout or any other io.Writer. Delegates to `log.Logger` for writing to the buffer.
func (*Logger) CopyWith ¶
CopyWith creates a copy of the logger with the prefix and debug values overridden by the arguments.
func (*Logger) Debug ¶
func (logger *Logger) Debug(args ...interface{})
Debug prints to stdout a debug-level logging message. Alias of Debugln method.
func (*Logger) DebugEnabled ¶
DebugEnabled returns if the debug logging should be displayed for a particular logger instance
func (*Logger) Debugln ¶
func (logger *Logger) Debugln(args ...interface{})
Debugln prints to stdout a debug-level logging message
func (*Logger) Error ¶
func (logger *Logger) Error(args ...interface{})
Error prints to stdout a error-level logging message. Alias of Errorn method.
func (*Logger) Errorln ¶
func (logger *Logger) Errorln(args ...interface{})
Errorln prints to stdout a error-level logging message
func (*Logger) Info ¶
func (logger *Logger) Info(args ...interface{})
Info prints to stdout a info-level logging message. Alias of Infoln method.
func (*Logger) Infoln ¶
func (logger *Logger) Infoln(args ...interface{})
Infoln prints to stdout a info-level logging message
func (*Logger) Panic ¶
func (logger *Logger) Panic(args ...interface{})
Panic prints to stdout a panic-level logging message. Alias of Panicln method.
func (*Logger) Panicln ¶
func (logger *Logger) Panicln(args ...interface{})
Panicln prints to stdout a panic-level logging message
func (*Logger) Warn ¶
func (logger *Logger) Warn(args ...interface{})
Warn prints to stdout a warning-level logging message. Alias of Warnln method.