Documentation ¶
Index ¶
- Constants
- Variables
- func Close()
- func Errorf(message string, args ...interface{})
- func Fatalf(message string, args ...interface{})
- func Infof(message string, args ...interface{})
- func JSON(serviceName string)
- func RegisterHook(h HookFunc, minlevel int)
- func RegisterLevelHook(h LevelHookFunc, minlevel int)
- func SetFilename(filename string)
- func SetOutput(w io.Writer)
- type HookFunc
- type LevelHookFunc
Constants ¶
View Source
const ( // InfoLog is Info level (lowest) for SetMinLevel InfoLog = iota + 1 // ErrorLog is Error level for SetMinLevel, between WarningLog and FatalLog ErrorLog // FatalLog is highest log level for SetMinLevel (logging into Fatalf will also throw panic()) FatalLog )
Variables ¶
View Source
var LogFilePath = "logs/misc.log"
Functions ¶
func Errorf ¶
func Errorf(message string, args ...interface{})
Errorf logs to dashboard (sends message through log channel) plus echoes to standard output
func Fatalf ¶
func Fatalf(message string, args ...interface{})
Fatalf logs to dashboard (sends message through log channel) plus echoes to standard output
func Infof ¶
func Infof(message string, args ...interface{})
Infof logs to dashboard (sends message through log channel) plus echoes to standard output
func RegisterHook ¶
RegisterHook will execute given hook function on every message
func RegisterLevelHook ¶
func RegisterLevelHook(h LevelHookFunc, minlevel int)
RegisterLevelHook will execute given hook function on every message (message and level)
Types ¶
type LevelHookFunc ¶
LevelHookFunc is hook func with log level input attribute
Click to show internal directories.
Click to hide internal directories.