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 logger trait #93

Merged
merged 1 commit into from
May 19, 2024
Merged

Add logger trait #93

merged 1 commit into from
May 19, 2024

Conversation

cryocz
Copy link
Contributor

@cryocz cryocz commented Mar 7, 2024

Introduced a new Logger trait which can be used to access all log events emitted during compilation. Currently these only include messages emitted by the @debug and @warn statements.

Changes were implemented in a backwards-compatible manner, but the current Options::quiet method has been marked as deprecated, as its behavior can be achieved using the NullLogger structure. The default logger used is StdLogger which writes all log events to standard error. This reflect the default behavior prior to introduction of Logger.

With these new changes, it is also now possible to properly test the @debug and @warn statements.

Introduced a new `Logger` trait which can be used to access all log events
emitted during compilation. Currently these only include messages emitted by the
`@debug` and `@warn` statements.

Changes were implemented in a backwards-compatible manner, but the current
`Options::quiet` method has been marked as deprecated, as its behavior can be
achieved using the `NullLogger` structure. The default logger used is
`StdLogger` which writes all log events to standard error. This reflect the
default behavior prior to introduction of `Logger`.

With these new changes, it is also now possible to properly test the `@debug`
and `@warn` statements.
@connorskees connorskees merged commit a1ca700 into connorskees:master May 19, 2024
@connorskees
Copy link
Owner

thanks, i really like this change!

@connorskees
Copy link
Owner

This has been published to crates.io as part of version 0.13.3.

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.

None yet

2 participants