add trim path
This commit is contained in:
@@ -16,7 +16,7 @@ func main() {
|
||||
log.Err(ctx, "error message", 42)
|
||||
service(ctx, log.Log())
|
||||
|
||||
logger := log.New(log.WithJSONFormat()).With(log.WithSource(10))
|
||||
logger := log.New(log.WithJSONFormat()).With(log.WithSource(10, log.TrimPath))
|
||||
logger.AlertKV(ctx, "alert message new logger", field.String("string", "value"))
|
||||
service(ctx, logger)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user