-
Notifications
You must be signed in to change notification settings - Fork 2
[CPP-242][CPP-243]LogLevel, uprev py2many, fix broken csv/sbp logging. #79
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
Conversation
7ca7ef1
to
7b37f66
Compare
7b37f66
to
f494a11
Compare
} | ||
} | ||
|
||
impl FromStr for CliLogLevel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed a second type so I could overload the from_str (already set in py2many via EnumString) function to display available variants to the user if they mispell one.
.unwrap(); | ||
|
||
log::set_boxed_logger(Box::new(logger)).expect("Failed to set logger"); | ||
log::set_max_level(log::LevelFilter::Info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to handle_cli function to set based off cli if provided.
class LogLevel(str, Enum): | ||
ERROR = "ERROR" | ||
WARNING = "WARNING" | ||
NOTICE = "NOTICE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTICE is a Python logging level, and a valid logging level in sbp / the piksi. Rust needs to not use it, as it isnt valid there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. I'll link it to warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Uh oh!
There was an error while loading. Please reload this page.