feat(log): Formatted console logging with file output
This commit is contained in:
22
colors.go
Normal file
22
colors.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package masterlog
|
||||
|
||||
// ANSI color codes
|
||||
const (
|
||||
colorReset = "\033[0m"
|
||||
colorGray = "\033[90m"
|
||||
colorLightGray = "\033[90m" // Dark gray for timestamp (dimmer)
|
||||
colorCyan = "\033[36m"
|
||||
colorTurquoise = "\033[36m" // Turquoise for field keys
|
||||
colorGreen = "\033[32m"
|
||||
colorYellow = "\033[33m"
|
||||
colorRed = "\033[31m"
|
||||
colorWhite = "\033[37m" // White for field values
|
||||
)
|
||||
|
||||
var levelColors = map[Level]string{
|
||||
LevelTrace: colorGray,
|
||||
LevelDebug: colorCyan,
|
||||
LevelInfo: colorGreen,
|
||||
LevelWarn: colorYellow,
|
||||
LevelError: colorRed,
|
||||
}
|
||||
Reference in New Issue
Block a user