AlexanderThaller / prometheus_exporter

Helper libary to export prometheus metrics using tiny_http and rust-prometheus.
MIT License
28 stars 10 forks source link

Breaking consuming crate logging #43

Closed cooperlees closed 4 months ago

cooperlees commented 1 year ago

Howdy,

I'm at a bit of a loss here and would love any help. I've attempted to move my project monitord-exporter to tracing for logging. I have a PR that moves to the tracing logging crate and uses the tracing_log adapter to get the prometheus_exporter log output.

But I seem to get no log output after I call prometheus_exporter::start(binding). I do get the inital log message from you then it all logging disappears:

cooper@home1:~/repos/monitord-exporter$ cargo run -- -l debug -p 1234
...
D0815 02:19:22.726302 472653 src/logging.rs:46] Logging is setup with LevelFilter::DEBUG level
I0815 02:19:22.726440 472653 src/main.rs:56] Starting monitord-exporter on port 1234
D0815 02:19:22.726599 472653 :] Server listening on [::]:1234
COOPER 1
COOPER 2

I have also tried disabling your logging feature in my Cargo.toml and that also did not help. Is there something I am doing wrong here as a user of your library?

Are you open to PR to move to tracing? :P

cooperlees commented 4 months ago

This seems to be working these days ...