Documentation ¶
Index ¶
- func CallerInfo(stackIndex int) string
- func Critical(msg interface{})
- func CriticalEx(keys Keys, msg string, args ...interface{})
- func Criticalf(msg string, args ...interface{})
- func Debug(msg interface{})
- func DebugEx(keys Keys, msg string, args ...interface{})
- func Debugf(msg string, args ...interface{})
- func Error(msg interface{})
- func ErrorEx(keys Keys, msg string, args ...interface{})
- func Errorf(msg string, args ...interface{})
- func Fatal(msg interface{})
- func FatalEx(keys Keys, msg string, args ...interface{})
- func Fatalf(msg string, args ...interface{})
- func Info(msg interface{})
- func InfoEx(keys Keys, msg string, args ...interface{})
- func Infof(msg string, args ...interface{})
- func Log(lvl Level, v ...interface{})
- func SetLevel(lvl Level)
- func Trace(msg interface{})
- func TraceEx(keys Keys, msg string, args ...interface{})
- func Tracef(msg string, args ...interface{})
- func Verbose(msg interface{})
- func VerboseEx(keys Keys, msg string, args ...interface{})
- func Verbosef(msg string, args ...interface{})
- func Warning(msg interface{})
- func WarningEx(keys Keys, msg string, args ...interface{})
- func Warningf(msg string, args ...interface{})
- type Keys
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallerInfo ¶
func CriticalEx ¶
CriticalEx writes a formatted string using the arguments provided to the log but also will prefix the log message with they keys provided to help print runtime variables.
func Criticalf ¶
func Criticalf(msg string, args ...interface{})
Criticalf writes a formatted string using the arguments provided to the log.
func DebugEx ¶
DebugEx writes a formatted string using the arguments provided to the log but also will prefix the log message with they keys provided to help print runtime variables.
func Debugf ¶
func Debugf(msg string, args ...interface{})
Debugf writes a formatted string using the arguments provided to the log.
func ErrorEx ¶
ErrorEx writes a formatted string using the arguments provided to the log but also will prefix the log message with they keys provided to help print runtime variables.
func Errorf ¶
func Errorf(msg string, args ...interface{})
Errorf writes a formatted string using the arguments provided to the log.
func FatalEx ¶
FatalEx writes a formatted string using the arguments provided to the log but also will prefix the log message with they keys provided to help print runtime variables.
func Fatalf ¶
func Fatalf(msg string, args ...interface{})
Fatalf writes a formatted string using the arguments provided to the log.
func InfoEx ¶
InfoEx writes a formatted string using the arguments provided to the log but also will prefix the log message with they keys provided to help print runtime variables.
func Infof ¶
func Infof(msg string, args ...interface{})
Infof writes a formatted string using the arguments provided to the log.
func Log ¶
func Log(lvl Level, v ...interface{})
Log will write a raw entry to the log, it accepts an array of interfaces which will be converted to strings if they are not already.
func SetLevel ¶
func SetLevel(lvl Level)
SetLevel will set the minimum message level that will be output to stdout. This level is inherited by new logging instances created via With. But does not affect completely new logging instances.
func TraceEx ¶
TraceEx writes a formatted string using the arguments provided to the log but also will prefix the log message with they keys provided to help print runtime variables.
func Tracef ¶
func Tracef(msg string, args ...interface{})
Tracef writes a formatted string using the arguments provided to the log.
func VerboseEx ¶
VerboseEx writes a formatted string using the arguments provided to the log but also will prefix the log message with they keys provided to help print runtime variables.
func Verbosef ¶
func Verbosef(msg string, args ...interface{})
Verbosef writes a formatted string using the arguments provided to the log.
Types ¶
type Logger ¶
type Logger interface { // Trace writes the provided string to the log. Trace(msg interface{}) // Tracef writes a formatted string using the arguments provided to the log. Tracef(msg string, args ...interface{}) // TraceEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. TraceEx(keys Keys, msg string, args ...interface{}) // Verbose writes the provided string to the log. Verbose(msg interface{}) // Verbosef writes a formatted string using the arguments provided to the log. Verbosef(msg string, args ...interface{}) // VerboseEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. VerboseEx(keys Keys, msg string, args ...interface{}) // Debug writes the provided string to the log. Debug(msg interface{}) // Debugf writes a formatted string using the arguments provided to the log. Debugf(msg string, args ...interface{}) // DebugEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. DebugEx(keys Keys, msg string, args ...interface{}) // Info writes the provided string to the log. Info(msg interface{}) // Infof writes a formatted string using the arguments provided to the log. Infof(msg string, args ...interface{}) // InfoEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. InfoEx(keys Keys, msg string, args ...interface{}) // Warning writes the provided string to the log. Warning(msg interface{}) // Warningf writes a formatted string using the arguments provided to the log. Warningf(msg string, args ...interface{}) // WarningEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. WarningEx(keys Keys, msg string, args ...interface{}) // Error writes the provided string to the log. Error(msg interface{}) // Errorf writes a formatted string using the arguments provided to the log. Errorf(msg string, args ...interface{}) // ErrorEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. ErrorEx(keys Keys, msg string, args ...interface{}) // Critical writes the provided string to the log. Critical(msg interface{}) // Criticalf writes a formatted string using the arguments provided to the log. Criticalf(msg string, args ...interface{}) // CriticalEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. CriticalEx(keys Keys, msg string, args ...interface{}) // Fatal writes the provided string to the log. Fatal(msg interface{}) // Fatalf writes a formatted string using the arguments provided to the log. Fatalf(msg string, args ...interface{}) // FatalEx writes a formatted string using the arguments provided to the log // but also will prefix the log message with they keys provided to help print // runtime variables. FatalEx(keys Keys, msg string, args ...interface{}) // SetDepth will change the number of stacks that will be skipped to find // the filepath and line number of the executed code. SetDepth(depth int) Logger // Log will write a raw entry to the log, it accepts an array of interfaces which will // be converted to strings if they are not already. Log(lvl Level, v ...interface{}) // With will create a new Logger interface that will prefix all log entries written // from the new interface with the keys specified here. It will also include any // keys that are specified in the current Logger instance. // This means that you can chain multiple of these together to add/remove keys that // are written with every message. With(keys Keys) Logger // Prefix will add a small string before the file path. Prefix(prefix string) Logger }