rust-lang / log

Logging implementation for Rust
https://docs.rs/log
Apache License 2.0
2.16k stars 250 forks source link

Add column numbers #581

Closed printfn closed 1 year ago

printfn commented 1 year ago

This adds column numbers to logs, using the column! macro.

Thomasdezeeuw commented 1 year ago

Personally I would be against this change. I don't think it adds any benefits to the log messages, usually the lines numbers themselves are enough, I rarely see two log statements on the same line. Furthermore it would increase the binary sizes, something that people have been trying to reduce lately, see https://github.com/rust-lang/log/pull/569 and https://github.com/rust-lang/log/pull/575 for example.

KodrAus commented 1 year ago

Thanks for looking into this @printfn. I agree with @Thomasdezeeuw that we should be careful of adding more automatic data into log records. This is (one of the many) case we could support with structured logging, which we've just been discussing stabilizing in #328.