Documentation ¶
Index ¶
Constants ¶
View Source
const ( ANSIReset = "\u001b[0m" ANSIRed = "\u001b[31m" ANSIBlue = "\u001b[34m" ANSIBlack = "\u001b[30m" ANSIGreen = "\u001b[32m" ANSIYellow = "\u001b[33m" ANSIMagenta = "\u001b[35m" ANSICyan = "\u001b[36m" ANSIWhite = "\u001b[37m" )
3 bit color ansi color codes for colored logging output srouce: https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html#8-colors
Variables ¶
View Source
var GlobalPrefix = "project"
Init logger global prefix
Functions ¶
This section is empty.
Types ¶
type Logger ¶ added in v1.0.0
type Logger struct {
// contains filtered or unexported fields
}
Contains a standard golang log.logger for this package to exectute it's functions
func New ¶ added in v1.0.0
Create a new logger similr to how you would create a default go log.Logger with log.New()
func (*Logger) Log ¶ added in v1.0.0
Log something, you can provide: a tag e.g. function name, a msg e.g. info about something that happened, a data interface, e.g. []int{3, 5, 6} OR 4+2
func (*Logger) SetLocalPrefix ¶ added in v1.0.1
Set local prefix of logger
Click to show internal directories.
Click to hide internal directories.