[Rock-dev] Question about iostream-based logging in base/types
Jan Vogelgesang
jan.vogelgesang at dfki.de
Thu Jan 26 14:30:25 CET 2012
On 26.01.2012 12:09, Sylvain Joyeux wrote:
> 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
you are right, it is a bug.
> 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 ?
I tried to implement the same semantics as logging_printf_style.h -
which is: no logging at all when "Release" is defined.
Maybe we should discuss this issue on the next framework meeting
together with Thomas.
Either way: redefining BASE_LOG_PRIORITY is of course bad practice, i
will change this to an implementation similar to logging_printf_style.h
Thanks for your advice!
jan
--
Jan Vogelgesang
Weltraumrobotik
Hauptadresse Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Besuchsadresse im Gebäude Unicom 1:
Mary-Somerville-Straße 9
28359 Bremen, Germany
Phone: +49 (0)421 178 45-6654
Fax: +49 (0)421 178 45-6613
E-Mail: jan.vogelgesang at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
More information about the Rock-dev
mailing list