rust-cli / env_logger

A logging implementation for `log` which is configured via an environment variable.
https://docs.rs/env_logger
Apache License 2.0
826 stars 128 forks source link

use target instead of module_path in formatter by default #205

Closed xofyarg closed 3 years ago

xofyarg commented 3 years ago

Target is used in filter, and its value defaults to module_path. To enable user customize the format, also to reduce confusion, makes formatter supporting target as well.

This change introduces a boolean builder variable "honor_target". When set to true(the default), formatter will use target in the record metadata.

Fix #155 and #179.

deastoe commented 3 years ago

I'd love to have this feature, even if the default behaviour remains the same.

mainrs commented 3 years ago

Superseeded by #209. Thanks for opening a PR and sorry that I wasn't active to merge it earlier on