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
803 stars 125 forks source link

Handle hyphens internally #197

Open Vagelis-Prokopiou opened 3 years ago

Vagelis-Prokopiou commented 3 years ago

With PR #77 a note about dashes in the crate name was added in the docs. The note was of course an essential addition.

I propose going a step further and handling the dashes internally, during the parsing (parse_spec() function). I believe this addition will save people time trying to debug the reason that the logging does not work as expected. I myself lost some time on this, even though I had read the docs, and I had read about the need to replace the dashes.

I would also have provided a PR too, but currently I am failing to build the library (see https://github.com/env-logger-rs/env_logger/issues/190#issuecomment-812988592).

Is there a valid reason for not handling the dashes internally?

mainrs commented 2 years ago

There is already a PR open for this: #177.