[Kroupware] KPilot and logMessages

Reinhold Kainhofer kroupware@mail.kde.org
Sun, 22 Dec 2002 21:10:23 +0100


I just saw in the kpilotDaemon code that a lot of logMessages were added for
kroupware without using i18n on the message itself.

>From looking at the code I even guess that most of the messages are just
meant as debug messages and thus shouldn't use logMessage (which puts a
message in KPilot's sync log so that the KDE user actually sees this
message), but rather

DEBUGDAEMON<<"My Debugmessage. If Debugging is turned off, this will be
optimized away by the compiler"<<endl;

which uses kdDebug(DAEMON_AREA) to write out the messages to cout/cerr. If
you start kpilot, you won't see the messages (becausse kpilot starts the
daemon later on), but if you start kpilotDaemon itself, you'll get the debug
output to the shell.

And in those cases where you really meant to write out a log message for the
KPilot user, you should definitely use i18n on the messges!

Best regards,
Reinhold


PS: Is it really necessary to link kpilotDaemon to the libkabc (neede just
once to get the name for the kmail storage), even if the user never intends
to sync to kroupware (kmail storage instead of on disk)? Isn't there a way
to dlopen kabc? It's not such a big issue, I just don't like the fact that
kpilotDaemon links to a lib which is doesn't need at all...