Documentation ¶
Index ¶
- Variables
- func DPanic(pluginProvider plugin.PluginProvider, v ...interface{})
- func DPanicf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func DPanicln(pluginProvider plugin.PluginProvider, v ...interface{})
- func Debug(pluginProvider plugin.PluginProvider, v ...interface{})
- func Debugf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func Debugln(pluginProvider plugin.PluginProvider, v ...interface{})
- func Error(pluginProvider plugin.PluginProvider, v ...interface{})
- func Errorf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func Errorln(pluginProvider plugin.PluginProvider, v ...interface{})
- func Fatal(pluginProvider plugin.PluginProvider, v ...interface{})
- func Fatalf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func Fatalln(pluginProvider plugin.PluginProvider, v ...interface{})
- func Info(pluginProvider plugin.PluginProvider, v ...interface{})
- func Infof(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func Infoln(pluginProvider plugin.PluginProvider, v ...interface{})
- func Panic(pluginProvider plugin.PluginProvider, v ...interface{})
- func Panicf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func Panicln(pluginProvider plugin.PluginProvider, v ...interface{})
- func Trace(pluginProvider plugin.PluginProvider, v ...interface{})
- func Tracef(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func Traceln(pluginProvider plugin.PluginProvider, v ...interface{})
- func Warn(pluginProvider plugin.PluginProvider, v ...interface{})
- func Warnf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
- func Warnln(pluginProvider plugin.PluginProvider, v ...interface{})
- type ILogger
- type Level
Constants ¶
This section is empty.
Variables ¶
var ( Name = self.Name Using = self.Using )
Functions ¶
func DPanic ¶
func DPanic(pluginProvider plugin.PluginProvider, v ...interface{})
DPanic logs a message at DPanicLevel, spaces are added between operands when neither is a string and a newline is appended.
func DPanicf ¶
func DPanicf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
DPanicf logs a formatted message at DPanicLevel.
func DPanicln ¶
func DPanicln(pluginProvider plugin.PluginProvider, v ...interface{})
DPanicln logs a message at DPanicLevel, spaces are always added between operands and a newline is appended.
func Debug ¶
func Debug(pluginProvider plugin.PluginProvider, v ...interface{})
Debug logs a message at DebugLevel, spaces are added between operands when neither is a string and a newline is appended.
func Debugf ¶
func Debugf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
Debugf logs a formatted message at DebugLevel.
func Debugln ¶
func Debugln(pluginProvider plugin.PluginProvider, v ...interface{})
Debugln logs a message at DebugLevel, spaces are always added between operands and a newline is appended.
func Error ¶
func Error(pluginProvider plugin.PluginProvider, v ...interface{})
Error logs a message at ErrorLevel, spaces are added between operands when neither is a string and a newline is appended.
func Errorf ¶
func Errorf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
Errorf logs a formatted message at ErrorLevel.
func Errorln ¶
func Errorln(pluginProvider plugin.PluginProvider, v ...interface{})
Errorln logs a message at ErrorLevel, spaces are always added between operands and a newline is appended.
func Fatal ¶
func Fatal(pluginProvider plugin.PluginProvider, v ...interface{})
Fatal logs a message at FatalLevel, spaces are added between operands when neither is a string and a newline is appended.
func Fatalf ¶
func Fatalf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
Fatalf logs a formatted message at FatalLevel.
func Fatalln ¶
func Fatalln(pluginProvider plugin.PluginProvider, v ...interface{})
Fatalln logs a message at FatalLevel, spaces are always added between operands and a newline is appended.
func Info ¶
func Info(pluginProvider plugin.PluginProvider, v ...interface{})
Info logs a message at InfoLevel, spaces are added between operands when neither is a string and a newline is appended.
func Infof ¶
func Infof(pluginProvider plugin.PluginProvider, format string, v ...interface{})
Infof logs a formatted message at InfoLevel.
func Infoln ¶
func Infoln(pluginProvider plugin.PluginProvider, v ...interface{})
Infoln logs a message at InfoLevel, spaces are always added between operands and a newline is appended.
func Panic ¶
func Panic(pluginProvider plugin.PluginProvider, v ...interface{})
Panic logs a message at PanicLevel, spaces are added between operands when neither is a string and a newline is appended.
func Panicf ¶
func Panicf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
Panicf logs a formatted message at PanicLevel.
func Panicln ¶
func Panicln(pluginProvider plugin.PluginProvider, v ...interface{})
Panicln logs a message at PanicLevel, spaces are always added between operands and a newline is appended.
func Trace ¶
func Trace(pluginProvider plugin.PluginProvider, v ...interface{})
Trace logs a message at TraceLevel, spaces are added between operands when neither is a string and a newline is appended.
func Tracef ¶
func Tracef(pluginProvider plugin.PluginProvider, format string, v ...interface{})
Tracef logs a formatted message at TraceLevel.
func Traceln ¶
func Traceln(pluginProvider plugin.PluginProvider, v ...interface{})
Traceln logs a message at TraceLevel, spaces are always added between operands and a newline is appended.
func Warn ¶
func Warn(pluginProvider plugin.PluginProvider, v ...interface{})
Warn logs a message at WarnLevel, spaces are added between operands when neither is a string and a newline is appended.
func Warnf ¶
func Warnf(pluginProvider plugin.PluginProvider, format string, v ...interface{})
Warnf logs a formatted message at WarnLevel.
func Warnln ¶
func Warnln(pluginProvider plugin.PluginProvider, v ...interface{})
Warnln logs a message at WarnLevel, spaces are always added between operands and a newline is appended.
Types ¶
type ILogger ¶
type ILogger interface { // Log writes a log entry, spaces are added between operands when neither is a string and a newline is appended. Log(level Level, v ...interface{}) // Logln writes a log entry, spaces are always added between operands and a newline is appended. Logln(level Level, v ...interface{}) // Logf writes a formatted log entry. Logf(level Level, format string, v ...interface{}) }
ILogger is a generic logging interface
type Level ¶
type Level int8
A Level is a logging priority. Higher levels are more important.
const ( // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel Level = iota // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // InfoLevel is the default logging priority. // General operational entries about what's going on inside the application. InfoLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // ErrorLevel level. Logs. Used for errors that should definitely be noted. ErrorLevel // DPanicLevel level. Logs and call `panic()` in development mode. DPanicLevel // PanicLevel level. Logs and call `panic()`. PanicLevel // FatalLevel level. Logs and then calls `logger.Exit(1)`. highest level of severity. FatalLevel )
func (Level) CapitalString ¶
CapitalString returns an all-caps ASCII representation of the log level.
func (Level) Get ¶
func (l Level) Get() interface{}
Get gets the level for the flag.Getter interface.
func (Level) MarshalText ¶
MarshalText marshals the Level to text. Note that the text representation drops the -Level suffix (see example).
func (*Level) Set ¶
Set converts a level string into a logger Level value. returns error if the input string does not match known values.
func (*Level) UnmarshalText ¶
UnmarshalText unmarshals text to a level. Like MarshalText, UnmarshalText expects the text representation of a Level to drop the -Level suffix (see example).
In particular, this makes it easy to configure logging levels using YAML, TOML, or JSON files.