Documentation ¶
Index ¶
- Constants
- Variables
- func Blue(s string) string
- func Bold(s string) string
- func Close()
- func Debug(format string, args ...interface{})
- func Dim(s string) string
- func Error(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func GetLogLevel() int
- func GetLogMicro() bool
- func GetLogUTC() bool
- func Green(s string) string
- func Important(format string, args ...interface{})
- func Info(format string, args ...interface{})
- func Log(level int, format string, args ...interface{})
- func OpenFile(logFile string) (err error)
- func Raw(format string, args ...interface{})
- func Red(s string) string
- func SetLogLevel(newLevel int)
- func SetLogMicro(newLogMicro bool)
- func SetLogUTC(newLogUTC bool)
- func Trace(format string, args ...interface{})
- func Warning(format string, args ...interface{})
- func Wrap(s, effect string) string
- func Yellow(s string) string
- type Handler
Constants ¶
View Source
const ( BOLD = "\033[1m" DIM = "\033[2m" RED = "\033[31m" GREEN = "\033[32m" BLUE = "\033[34m" YELLOW = "\033[33m" FG_BLACK = "\033[30m" FG_WHITE = "\033[97m" BG_PURPLE = "\033[45m" BG_RED = "\033[41m" BG_GREEN = "\033[42m" BG_YELLOW = "\033[43m" BG_DGRAY = "\033[100m" BG_LBLUE = "\033[104m" RESET = "\033[0m" )
https://misc.flogisoft.com/bash/tip_colors_and_formatting
View Source
const ( DEBUG = iota INFO IMPORTANT WARNING ERROR FATAL TRACE = -1 )
log level constants
Variables ¶
Functions ¶
func Debug ¶
func Debug(format string, args ...interface{})
Debug is the log level for debugging purposes
func Error ¶
func Error(format string, args ...interface{})
Error is the log level for errors that should be corrected
func Fatal ¶
func Fatal(format string, args ...interface{})
Fatal is the log level for errors that must be corrected before continue
func Important ¶
func Important(format string, args ...interface{})
Important is the log level for things that must pay attention
func Info ¶
func Info(format string, args ...interface{})
Info is the log level for informative messages
func Trace ¶
func Trace(format string, args ...interface{})
Trace is the log level for tracing purposes
Types ¶
Click to show internal directories.
Click to hide internal directories.