Code review comment for lp:~dobey/unity-api/add-simple-logger

Revision history for this message
dobey (dobey) wrote :

Well, I made the Logger class an ostringstream based class, got rid of all the operator overrides, moved the ctor/dtor bits into a compiled file, and made it much simpler.

However, the macros have to be the way they are, because of the dependency on the G_LOG_DOMAIN value being defined at compile time. I wasn't able to get around this yet, but am open to suggestions. The goal with this was to have something as simple to use as qDebug() but which uses the g_log functionality, so we automatically get the G_DEBUG_MESSAGES env var handling at runtime, as a means of being consistent across the platform.

I unfortunately am also not able to get the output buffer overriding working right in the tests. It seems to work fine for the debug() case, but fails for all the other cases, regardless of how I order them.

I looked at what's in unity-scopes-api and it seems a bit complex for what I was wanting to do here.

« Back to merge proposal