Documentation ¶
Overview ¶
Package mallogger provides simple log printing with customizable color and level.
Index ¶
- Constants
- type Log
- func (l Log) Debug(format string, args ...interface{})
- func (l Log) Error(format string, args ...interface{})
- func (l Log) Fatal(format string, args ...interface{})
- func (l Log) Info(format string, args ...interface{})
- func (l Log) Print(logType int, format string, args ...interface{})
- func (l Log) Trace(format string, args ...interface{})
- func (l Log) Warn(format string, args ...interface{})
Constants ¶
View Source
const ( // LevelZero is no log level. LevelZero = iota // LevelHigh is log level showing Error and Fatal. LevelHigh // LevelNormal is log level showing Info, Error, and Fatal. LevelNormal // LevelDebug is log level showing Debug, Info, Warn, Error, and Fatal. LevelDebug // LevelComplete is log level showing all type of log. LevelComplete )
View Source
const ( TypeTrace = iota TypeDebug TypeInfo TypeWarn TypeError TypeFatal )
Log types.
View Source
const ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" White = "\033[37m" BrightBlack = "\033[90m" BrightRed = "\033[91m" BrightGreen = "\033[92m" BrightYellow = "\033[93m" BrightBlue = "\033[94m" BrightMagenta = "\033[95m" BrightCyan = "\033[96m" BrightWhite = "\033[97m" )
Foreground text colors. The output colors may vary on different OS. Taken from https://en.wikipedia.org/wiki/ANSI_escape_code.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.