Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NOTIFICATION / SUMMARY EmojiPanic = "❌" // 2 X EmojiError = "❌" // 3 R EmojiWarning = "🟨" // 4 Y EmojOkay = "🟩" // 5 G EmojiInfo = "ℹ️" // 6 I // TRANSIENT // EmojiProgress = "▫️" // 7 // EmojiDbg = "❓" // misspelled cos 8 != RFC5424 "7" EmojiDebug = "💠" )
Levels (3,4,5) (Error,Warning,Okay) (3,4,5) (R,Y,G) are intended as summary items for execution checkpoints. Grn, Ylw, Red (currently disabled) are calm B/G indicator lights. .
Variables ¶
View Source
var LevelNames = map[Level]string{ LevelDebug: "?Dbg", LevelInfo: "Info", LevelOkay: "Okay", LevelWarning: "Warning", LevelError: "Error", LevelPanic: "PANIC", }
LevelNames maps log levels to user-frenly names
Functions ¶
func EmojiOfLevel ¶
Types ¶
type Level ¶
type Level int
Level describes the level of a log message.
type LogMessage ¶
type LogMessage struct { Level // contains filtered or unexported fields }
LogMessage is a log level + string message pair. It should be accumulated into a slice by code that does not have access to system logging facilities.
The string can be (for example) the output of a call to fmt.Sprintf(..) that would normally be passed to a logger. It could therefore be created using the "%w" format specifier. .
type LogMsgList ¶
type LogMsgList []LogMessage
func (LogMsgList) MaxLevel ¶
func (llm LogMsgList) MaxLevel(maxLvl Level)
Click to show internal directories.
Click to hide internal directories.