File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ func init() {
34
34
35
35
opts := & slog.HandlerOptions {
36
36
Level : level ,
37
- AddSource : true , // Include source file and line number for context
37
+ AddSource : false , // Include source file and line number for context
38
38
ReplaceAttr : humanFriendlyAttrs , // Customize log attributes for readability
39
39
}
40
40
@@ -47,9 +47,6 @@ func init() {
47
47
// humanFriendlyAttrs customizes log attributes for human readability
48
48
func humanFriendlyAttrs (groups []string , a slog.Attr ) slog.Attr {
49
49
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" ))
53
50
case slog .LevelKey :
54
51
// Capitalize log levels for better visibility
55
52
a .Value = slog .StringValue (strings .ToUpper (a .Value .String ()))
You can’t perform that action at this time.
0 commit comments