Skip to content

Commit a6f66ce

Browse files
committed
log cleanup
1 parent ba29e14 commit a6f66ce

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/cmd/logger.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func init() {
3434

3535
opts := &slog.HandlerOptions{
3636
Level: level,
37-
AddSource: true, // Include source file and line number for context
37+
AddSource: false, // Include source file and line number for context
3838
ReplaceAttr: humanFriendlyAttrs, // Customize log attributes for readability
3939
}
4040

@@ -47,9 +47,6 @@ func init() {
4747
// humanFriendlyAttrs customizes log attributes for human readability
4848
func humanFriendlyAttrs(groups []string, a slog.Attr) slog.Attr {
4949
switch a.Key {
50-
case slog.TimeKey:
51-
// Format time as a human-readable string
52-
a.Value = slog.StringValue(a.Value.Time().Format("2006-01-02 15:04:05"))
5350
case slog.LevelKey:
5451
// Capitalize log levels for better visibility
5552
a.Value = slog.StringValue(strings.ToUpper(a.Value.String()))

0 commit comments

Comments
 (0)