Skip to content

Conversation

john-michaelburke
Copy link
Collaborator

@john-michaelburke john-michaelburke commented Jun 26, 2021

  • Complete functionality for LogLevel.
  • Uprev py2many and update our generated files + requirements + pypoetry lock.
  • Fix broken sbp/csv logging.
  • Cleaned up the navbar spacing and button/dropdown widths for the serial option.

@john-michaelburke john-michaelburke force-pushed the john-michaelburke/loglevel branch from 7ca7ef1 to 7b37f66 Compare June 26, 2021 00:58
@john-michaelburke john-michaelburke force-pushed the john-michaelburke/loglevel branch from 7b37f66 to f494a11 Compare June 26, 2021 01:04
}
}

impl FromStr for CliLogLevel {
Copy link
Collaborator Author

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);
Copy link
Collaborator Author

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.

@john-michaelburke john-michaelburke requested review from a team and jayvdb June 26, 2021 01:45
class LogLevel(str, Enum):
ERROR = "ERROR"
WARNING = "WARNING"
NOTICE = "NOTICE"
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@john-michaelburke john-michaelburke requested a review from a team June 26, 2021 02:02
@john-michaelburke john-michaelburke requested a review from a team June 26, 2021 02:04
@john-michaelburke john-michaelburke merged commit 3d01b9c into main Jun 26, 2021
@john-michaelburke john-michaelburke deleted the john-michaelburke/loglevel branch June 26, 2021 19:01
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.

3 participants