[Rock-dev] Updates to Logger
Thomas Roehr
thomas.roehr at dfki.de
Wed Jan 21 10:46:05 CET 2015
On 19.01.2015 15:34, Jakob Schwendner wrote:
> Hi,
>
> I've come across the base/logger again, and noticed a number of problems
> with it.
>
> I would like the base/logging to be a standard for everything logging in
> rock.
>
> Currently I have some confidence issues, that if I use the logger for e.g.
> tracing that I will actually get the messages.
> I've created some pull requests to fix some of the problems:
> https://github.com/rock-core/base-types/pull/26
> https://github.com/rock-core/tools-orocosrb/pull/37
> https://github.com/orocos-toolchain/utilrb/pull/15
>
> There are two things left, that I did not want to change without discussion:
> (1) Currently CMake define NDEBUG, even on RelWithDebInfo. The base level
> for the logger is currently determined by checking for NDEBUG, and switching
> to LOG_LEVEL_WARN. This is not what I would expect.
Not clear to me what you expected, but I in general I agree
that we need a generally agreed on convention on the behaviour of the
logger.
> My proposal is therefore
> to change the base/cmake, to create a new symbol, e.g. -DRelease, which is
> then used in the logger to set to WARN for Release packages, and compile in
> everything otherwise.
I don't think there is a need for additional symbols, since there are
already ways to
set what can be compiled in, e.g. defining BASE_LOG_WARN will prevent
all logs of less priority to be compiled
in. I would prefer to check at cmake level and set the BASE_LOG_XXX
given on the behaviour we decide on.
> I could also set the BASE_LOG_LEVEL directly in the
> cmake, but that makes it harder to override.
No sure what you mean by that?
> (2) A nice option would be for the logger to tell me if the level I am
> requesting is not actually compiled in. This however would need for each log
> module to do this check once. This is probably a little bit of work to get
> right. Any ideas?
>
> On another note: I would argue to not set any packages to stable right now.
> I don't see any advantage of leaving out all debug information, other than
> maybe size.
>
> Cheers,
>
> Jakob
>
>
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
--
Thomas Röhr (M.Sc.)
Space Robotics
Besuchsadresse der Nebengeschäftstelle:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Postadresse der Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 1
28359 Bremen, Germany
Tel.: +49 421 178 45-4151
Zentrale: +49 421 178 45-0
Fax: +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen)
E-Mail:thomas.roehr 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