Code review comment for lp:~jpakkane/unity-scopes-api/simplelogging

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Not having global variables is a valid goal. To do that we either need to:

1. pass a logging provider to all classes that need logging (tedious, let's not do that)
2. have errlog class determine where the messages should go and configure LogGather to write its stuff there

Option 2 would mean roughly this in pseudocode:

if something
  l = LogGatherer(with some options)
else
  l = LogGatherer(with some other options)
endif

I would imagine this is what Qt does and why its logging classes are used like this:

qDebug() << "something";

« Back to merge proposal