Drakulix / simplelog.rs

Simple Logging Facility for Rust
https://docs.rs/simplelog/
Apache License 2.0
423 stars 71 forks source link

[WIP] Add target padding #85

Closed tekjar closed 2 years ago

tekjar commented 2 years ago

@Drakulix Can you guide me how to log just module name instead of full path

tekjar commented 2 years ago

@Drakulix Can you please review this?

Drakulix commented 2 years ago

@Drakulix Can you guide me how to log just module name instead of full path

Well to log just the module name, we need to filter the target string. Something like target.rsplit("::").next().unwrap() should do the job.

That should probably be configurable via another enum TargetPath (or something similar). Initially two options Full and Module should be enough.

But that can be done in a separate PR and this one looks good, so I am going to enable the CI-checks.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+1.06%) to 70.021% when pulling 09da042e5c5eced2781fa0e051314d814b38582a on bytebeamio:modulepad into aea22dbc0e08942bf441d25fe325a7f1eb10372b on Drakulix:master.