Skip to content

funcr Feature Request: Add LogInfoLevel Option to skip logging level in the info log #239

@spacewander

Description

@spacewander

Currently, the info level is always logged:

args = append(args, "level", level, "msg", msg)
.

However, in some situations, people may not use the log level or have an alternative to the integer log level field. So logging the integer log level in these situations may be a little useless.

The zapr implementation has an option called LogInfoLevel to control if the numeric log level is logged:
https://github.com/go-logr/zapr/blob/78b8af5329abd1ba8695aad821f95fb2e7f4e651/zapr.go#L270

What about adding a similar feature to logr? I am glad to implement it if it is accepted.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions