feat(log): Formatted console logging with file output

This commit is contained in:
Björn Benouarets
2025-11-10 05:20:25 +01:00
parent 3e78775b0f
commit 7b3c176d20
12 changed files with 1344 additions and 0 deletions

22
colors.go Normal file
View 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,
}