Skip to content

Improve svd2rust's logging story #183

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

Closed
jamesmunns opened this issue Feb 28, 2018 · 2 comments
Closed

Improve svd2rust's logging story #183

jamesmunns opened this issue Feb 28, 2018 · 2 comments

Comments

@jamesmunns
Copy link
Member

Currently there is only output on STDERR when some subset of failures occur. There is no feedback for items such as:

  • Empty Registers
  • Skipped Peripherals

Additionally, there are no different levels of logging, as of now all output is written directly to stderr.

We should consider adding:

  • some kind of granular logging system, maybe using slog or env_logger
  • additional error, warning, and info logs usable for development or troubleshooting
@achan1989
Copy link
Contributor

As a starter I can introduce a logging system, but keep the existing "error and warning messages get printed to stderr" behaviour.

What's the desired end goal? Print info and higher to stderr by default, and use a -v command-line switch to enable debug-level log printing?

bors bot added a commit that referenced this issue Jun 15, 2019
237: Introduce a logging system. r=ryankurte a=achan1989

This pull request makes progress on #183.

I've replaced the existing print/eprint calls with the appropriate logging macros, and arbitrarily chose env_logger to handle the logging.

This should be functionally identical to the branch point, although the format of the logging output is different -- it's now of the form `<SEVERITY> svd2rust: <message>`.

Co-authored-by: achan1989 <[email protected]>
@burrbull burrbull mentioned this issue Jul 19, 2019
@adamgreig
Copy link
Member

#237 adds a logging system, so I'm closing this issue. If we need to improve logging further please open a subsequent issue.

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

No branches or pull requests

3 participants