[Rock-dev] Question about iostream-based logging in base/types

Sylvain Joyeux sylvain.joyeux at dfki.de
Thu Jan 26 12:09:43 CET 2012


The following lines made me wonder:

   #ifdef Release
   #undef BASE_LOG_PRIORITY
   #define BASE_LOG_PRIORITY 9999
   #endif

   #define LOG_STREAM(PRIO) if(PRIO > BASE_LOG_PRIORITY) ; else ....

Since priority seems to go higher when the messages are less important 
(!), it seems that you turn ON every messages when Release is defined, 
which is pretty strange

In general, isn't it bad practice to redefine BASE_LOG_PRIORITY anyway ? 
If we do want to force it, then shouldn't it leave at least the WARN 
messages and higher out ?

Sylvain


More information about the Rock-dev mailing list