mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 09:49:07 +01:00
Replace CARGO_PKG_NAME
with CARGO_CRATE_NAME
in logging
This commit is contained in:
parent
c2c9620b48
commit
735e6a41f2
2 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Changed
|
||||
|
||||
- Require that `AsUpdateStream::Stream` is `Send`
|
||||
- Restrict a user crate by `CARGO_CRATE_NAME` instead of `CARGO_PKG_NAME` in `enable_logging!` and `enable_logging_with_filter!`.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ macro_rules! enable_logging_with_filter {
|
|||
($filter:expr) => {
|
||||
pretty_env_logger::formatted_builder()
|
||||
.write_style(pretty_env_logger::env_logger::WriteStyle::Auto)
|
||||
.filter(Some(&env!("CARGO_PKG_NAME").replace("-", "_")), $filter)
|
||||
.filter(Some(&env!("CARGO_CRATE_NAME").replace("-", "_")), $filter)
|
||||
.filter(Some("teloxide"), log::LevelFilter::Info)
|
||||
.init();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue