Mir

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

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

50 + void set_level(Severity max_level) { log_level = max_level; }
51 +

We shouldn't have implementation in an interface or in a header. This fails on both counts.

~~~~

63 +std::shared_ptr<Logger> get_logger();

So the only point of this is to be able to set the log level? Why not just set a suitable logger? Or have a set_level() function?

~~~~~

113 + // Ensure clients don't get polluted with Mir information/debug
114 + // messages by default.
115 + ret->set_level(mir::logging::Severity::error);

This play badly with servers that use the client API. We don't want to override their logging defaults.

Also, it would be convenient to configure the logging level at runtime. E.g. environment variable for clients or the command line for servers.

review: Needs Fixing

« Back to merge proposal