Documentation ¶
Index ¶
- type Log
- type LogLevel
- type LogOpts
- type Logger
- func (l Logger) Log(level LogLevel, msg string)
- func (l Logger) LogCritical(msg string, a ...interface{})
- func (l Logger) LogDebug(msg string, a ...interface{})
- func (l Logger) LogError(msg string, a ...interface{})
- func (l Logger) LogErrorType(e error)
- func (l Logger) LogInfo(msg string, a ...interface{})
- func (l Logger) LogMsg(msg Log)
- func (l Logger) LogPanic(msg string, a ...interface{})
- func (l Logger) LogWarn(msg string, a ...interface{})
- func (l Logger) PanicSafe(a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevel ¶
type LogLevel int
LogLevel of importance for a log message
const ( // Debug output and below Debug LogLevel = 5 // Info output and below Info LogLevel = 4 // Warnings and below Warnings LogLevel = 3 // Errors will show by default Errors LogLevel = 2 // Critical will show but can be silenced Critical LogLevel = 1 // StdoutOnly for only showing via stdout StdoutOnly LogLevel = 0 )
type LogOpts ¶
type LogOpts struct { // Output file for logging - Required for file output OutFile string // Keybase Team for logging - Required for Keybase output KBTeam string // Keybase Channel for logging - Optional for Keybase output KBChann string // Log level / verbosity (see LogLevel) Level LogLevel // Program name for Keybase logging - Required for Keybase output ProgName string // Use stdout - Required to print to stdout UseStdout bool // contains filtered or unexported fields }
LogOpts to be passed to NewLogger()
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger with options for logging to file, keybase or stdout. More functionality could be added within the internal handleLog() func.
func (Logger) LogCritical ¶
LogCritical shortcut from string - Will notifiy Keybase users
func (Logger) LogErrorType ¶
LogErrorType for compatibility - Will notify keybase users
Click to show internal directories.
Click to hide internal directories.