Subject: Logging vs Reporting

From: Christopher James Halse Rogers <[email-masked]>
Date: Thu, 24 Jul 2014 16:09:13 +1000

Hey all.

This is somewhat of a revival of a discussion from London, and 
tangentially related to the contentious fatal-error branch.

We currently have no logging in our codebase outside of the 3rd_party 
android code. This makes it difficult to work out what's happening when 
things go wrong because we get nothing but a “oops, this didn't 
work” exception without context; hence the fatal-error branch.

I remember there was some resistance to freeform logging in London. 
What do people think about a global mir::log(mir_severity¹ severity, 
char const* format, ...) function for freeform logging, with this going 
out to the console by default?

¹: Suggested severities - {debug, info, warning, error}

---

From: Daniel van Vugt <[email-masked]>
Date: Thu, 24 Jul 2014 14:14:18 +0800

> android code.

Yes we do. Just remember to re-use or enhance it:
   include/shared/mir/logging/logger.h
   src/shared/logging/dumb_console_logger.cpp

---

From: Christopher James Halse Rogers <[email-masked]>
Date: Thu, 24 Jul 2014 16:36:01 +1000

>   src/shared/logging/dumb_console_logger.cpp

Yes, we have some infrastructure for logging. We don't currently log 
anything, though. (We do use this infrastructure for the *_reports, but 
they're not logs)