Mir

Code review comment for lp:~vanvugt/mir/log-level

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yeah I can see we only have a stdout issue here. If we can just "fix" DumbConsolerLogger and nothing else then we should. The problem is; everything else in Mir works with a generic Logger. Even:
  void set_logger(std::shared_ptr<Logger> const& new_logger);
indicates that the default process-wide logger can be any implementation. So we need to touch the generic Logger interface.

I'm not sure how set_level could be made safe and reliable. I've implemented raise_level instead, because that guarantees all callers' requests are honoured (the log level never decreases to less than you need).

"The problem is with the logging::log()" ... I'm not sure it's a good idea to provide different behaviour for log() vs somelogger->log(). Sounds like it would be quite inconsistent, which this current proposal is not.

« Back to merge proposal