[Development] Categorized logging inside Qt

Poenitz Andre Andre.Poenitz at digia.com
Fri Apr 11 10:11:14 CEST 2014


Shawn.Rutledge at digia.com wrote:
> On 10 Apr 2014, at 7:20 PM, Frederik Gladhorn wrote:
> 
> > Hi all,
> >
> > I just started to port accessibility to the new and shiny categorized logging.
> > http://blog.qt.digia.com/blog/2014/03/11/qt-weekly-1-categorized-logging/
> >
> > I'd propose we decide on a certain style of declaring categories.
> >
> > A quick grep shows that we already have some variety, I'd like to unify this
> > before Qt 5.3 is out of the door. I actually saw a patch adding DBG_FOOBAR as
> > new category, that made me wonder about which style we should use.

> I think the pattern is OK though: all uppercase, with a prefix like DBG and try to keep
> them as short as possible since they get repeated all over.

We tend to avoid abbreviations, so DBG instead of DEBUG looks odd.

Your reasoning that it's REPEATED ALL OVER also MAKES ME THINK
that USING ALL CAPS might be NO GOOD IDEA as it gives ME the 
feeling the code is constantly SHOUTING AT ME.

Andre'

PS: The time such features are contributed the "style guide" should be part
of the original documentation to avoid after-the-fact bike shedding ;-}


More information about the Development mailing list