https://github.com/yskszk63/capture-logger
log implementation for testing.
https://github.com/yskszk63/capture-logger
logging rust test
Last synced: 25 days ago
JSON representation
log implementation for testing.
- Host: GitHub
- URL: https://github.com/yskszk63/capture-logger
- Owner: yskszk63
- License: apache-2.0
- Created: 2020-12-12T08:27:31.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-12T08:49:43.000Z (over 5 years ago)
- Last Synced: 2026-03-18T09:42:29.787Z (3 months ago)
- Topics: logging, rust, test
- Language: Rust
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# capture-logger
[`log`](https://docs.rs/log/0.4.11/log/) implementation for testing.
### Dependencies
```toml
[dev-dependencies]
capture-logger = "0.1"
```
### Example
```rust
use capture_logger::{begin_capture, pop_captured};
begin_capture();
log::debug!("LOG");
assert_eq!(pop_captured().unwrap().message(), "LOG");
```
### License
Licensed under either of
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.!
License: MIT OR Apache-2.0