You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read the doc, but may have missed it. Feel free to point it out if this is already available.
My team is implementing go-hclog in a service, while other services of our services are using slog.
In our slog implementation, we added a level for auditing, in between warn and error. We had the ability to change the name of the level so it outputs the word "audid" where it would normally say "debug" or "info" etc.
We added the audit ability to the go-hclog implementation at log level 6, but I can't seem to get the logger to output the name "audit" I can get the logger to output [?????] or if I turn on json, it outouts @Level:all
slog's level.go explains that it leaves gaps in the level integers, (-4, 0, 4, 8) and we added a log level between 4 and 8. Then we change the name in a function in our own code. But in go-hclog, I can't seem to change the level label, it seems to be added in intlogger.go -> writer.go.
tldr: Custom log level and custom log level labels.
The text was updated successfully, but these errors were encountered:
chadglaser4682
changed the title
Add ability to add custom log level
Add ability to add custom log level and custom log level label
Sep 11, 2024
I read the doc, but may have missed it. Feel free to point it out if this is already available.
My team is implementing go-hclog in a service, while other services of our services are using slog.
In our slog implementation, we added a level for auditing, in between warn and error. We had the ability to change the name of the level so it outputs the word "audid" where it would normally say "debug" or "info" etc.
We added the audit ability to the go-hclog implementation at log level 6, but I can't seem to get the logger to output the name "audit" I can get the logger to output [?????] or if I turn on json, it outouts @Level:all
slog's level.go explains that it leaves gaps in the level integers, (-4, 0, 4, 8) and we added a log level between 4 and 8. Then we change the name in a function in our own code. But in go-hclog, I can't seem to change the level label, it seems to be added in intlogger.go -> writer.go.
tldr: Custom log level and custom log level labels.
The text was updated successfully, but these errors were encountered: