Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --map-level to rewrite log levels #84

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Conversation

hackedd
Copy link
Contributor

@hackedd hackedd commented Dec 19, 2023

This allows rewriting the levels in the log to values that are recognized by fblog. Particularly useful when logs contain numeric levels like those generated by Bunyan or syslog.

This allows rewriting the levels in the log to values that are
recognized by fblog. Particularly useful when logs contain numeric
levels like those generated by Bunyan or syslog.
@bomgar
Copy link
Member

bomgar commented Dec 19, 2023

The level_to_style function in template rs maps those levels to colors. I think the available options should match. Maybe just add the colors for the new levels trace and fatal. Maybe the supported levels should be constants somewhere 🤔 . Although I thought awhile ago that I should move the colors to the config and get rid of a fixed set.

Otherwise this looks good.

@bomgar bomgar merged commit d9ea29e into brocode:master Dec 20, 2023
@bomgar
Copy link
Member

bomgar commented Dec 20, 2023

I removed the default. It felt weird to include numbers of some arbitrary node library. I added the example to the readme.

@hackedd
Copy link
Contributor Author

hackedd commented Dec 20, 2023

Fair enough!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants