Documentation ¶
Overview ¶
Package logger is a custom logger package to output colorized emoji output to the standard output. The programmer should feel free to trace log as much of the code.
Index ¶
Constants ¶
View Source
const ( CriticalEmoji = "🚑" DebugEmoji = "🐞" InfoEmoji = "🧐" SuccessEmoji = "✅" ErrorEmoji = "😱" WarningEmoji = "⚠️" )
This is the set of emoji definition.
Variables ¶
View Source
var ( // Level Numeric value // SUCCESS 60 // CRITICAL 50 // ERROR 40 // WARNING 30 // INFO 20 // DEBUG 10 // NOTSET 0 // // // Sets the threshold for the logger. // Logging messages which are less severe than level will be ignored. // The default level is set to NOTSET (which causes all messages to be // processed). Level = 0 // TimeStamps defines if the output has timestamp or not. // This is a global option and affects all methods. TimeStamps = true // Color defines if the output is colorized or not. It's dynamically set to // false or true based on the stdout's file descriptor referring to a // terminal or not. This is a global option and affects all methods. Color = false // BackgroundColor defines if the output has Background color or not. // It's dynamically set to false or true based on the stdout's file // descriptor referring to a terminal or not. This is a global option and // affects all methods. BackgroundColor = false )
It contains configuration of logger.
Functions ¶
func Critical ¶
func Critical(format string, a ...interface{})
Critical formats according to a format specifier and writes to standard output.
func Debug ¶
func Debug(format string, a ...interface{})
Debug formats according to a format specifier and writes to standard output.
func Error ¶
func Error(format string, a ...interface{})
Error formats according to a format specifier and writes to standard output.
func Info ¶
func Info(format string, a ...interface{})
Info formats according to a format specifier and writes to standard output.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.