Replace logging system with slog and tint for structured colored output
- Add logger.go with public Logger variable and InitLogger function - Replace all fmt.Printf/fmt.Fprintf calls with structured Logger.Info/Logger.Error - Initialize logger in main function for consistent access across packages - Keep fmt.Errorf for proper error creation (standard Go practice) - Add tint dependency for colorized terminal output with timestamps - Convert user output to structured logging with key-value pairs - Update info command to use structured logging for plugin details - Update updateassets command to use structured progress logging - Update version command to use structured logging - Update authentication logging in client.go with structured fields - Update enable/disable commands to use structured logging - Remove unused fmt imports after conversion All output now uses slog with tint for beautiful, structured, colorized logging while maintaining proper error handling with fmt.Errorf for error creation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b43e7ac3ec
commit
73149001eb
11 changed files with 80 additions and 46 deletions
2
go.sum
2
go.sum
|
@ -870,6 +870,8 @@ github.com/leonklingele/grouper v1.1.2 h1:o1ARBDLOmmasUaNDesWqWCIFH3u7hoFlM84Yrj
|
|||
github.com/leonklingele/grouper v1.1.2/go.mod h1:6D0M/HVkhs2yRKRFZUoGjeDy7EZTfFBE9gl4kjmIGkA=
|
||||
github.com/letsencrypt/boulder v0.0.0-20250411005613-d800055fe666 h1:ndfLOJNaxu0fX358UKxtq2bU8IMASWi87Hn0Nv/TIoY=
|
||||
github.com/letsencrypt/boulder v0.0.0-20250411005613-d800055fe666/go.mod h1:WGXwLq/jKt0kng727wv6a0h0q7TVC+MwS2S75rcqL+4=
|
||||
github.com/lmittmann/tint v1.1.2 h1:2CQzrL6rslrsyjqLDwD11bZ5OpLBPU+g3G/r5LSfS8w=
|
||||
github.com/lmittmann/tint v1.1.2/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue