On 31/10/2011 2:39 AM, Marijn Haverbeke wrote:
Also relevant here: log_err was originally added as a stopgap temporary solution, with the idea being that logging eventually would be a more primitive operation where you specified both a log level and a message, and there would be a macro that'd help you do this in a more nice-looking way. We have four log levels, but are only using two of them at the moment. Making log polymorphic has removed one reason for making it a macro (the idea was to integrate #fmt), but proper support for more log levels would still be nice.
I agree. log_err was a kludge and I'd prefer to un-kludge it before shipping rather than adding another keyword. Multiple log-levels is the way to go. Macro if there's something relatively easy, or just keep 'log' as compiler-supported, but extend the syntax and include a bunch of log-level numeric constant names in the prelude (err, warn, info, debug, say?)
(Tangentially, the standard prelude, if such a thing materializes, would be the ideal spot for such a logging macro.)
Yes. Or just the constants, as above. -Graydon _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev