loggr icon indicating copy to clipboard operation
loggr copied to clipboard

Prevent duplication of messages and warnings?

Open DarwinAwardWinner opened this issue 8 years ago • 0 comments

I like the simplicity of this package, and would like to use it just to add timestamps to my messages and warnings. However, it seems that the timestamped messages appear in addition to the normal ones rather then replacing them. Is there any way to fix this?

> library(loggr)
> log_file("console")
2017-03-17 11:15:51.149 - DEBUG - Activating logging to console
> message("This appears twice")
2017-03-17 11:22:56.405 - SIMPLEMESSAGE - This appears twice
This appears twice

(Obviously I could just replace message with log_info, etc., but I can't do that in other packages' code that uses message.)

DarwinAwardWinner avatar Mar 17 '17 18:03 DarwinAwardWinner