[Freeipa-devel] [PATCH] initial commit of log watcher (lwatch)

Dmitri Pal dpal at redhat.com
Fri Jul 24 13:06:22 UTC 2009


>
> Debug messages should NEVER be conditionally compiled. For an
> executable, they should always be set by a runtime flag, and for a
> library they should always be set by an argument to the initialization
> function or by an environment variable. It should always be possible for
> someone running the code in a production environment to get additional
> information about a crash without requiring an instrumented build.
>
> Furthermore, "tracing" should be a special case of debugging (i.e. it
> should just be a very high debug_level.
Steve,

Here we disagree.
Let us set terminology first:
logging - unconditional output of the program about its normal operation
or issues it encountered.
debugging - conditional output for testing at runtime
tracing - conditionally compiled low level output for debugging specific
area of the code.

There should be a good balance between all three.
logging and debugging is needed for any service as you said to be able
to  understand what is happening and troubleshoot at run time.

Tracing is more for the low level libraries. Keep in mind that it
becomes extremely costly to have tracing always compiled in.
The libraries should be delivered as .so so building an so with enabled
tracing and swapping it should not be a big problem.

Spo tracing is not a special form of debugging. This is "one size fits
all approach" and it is wrong in this case.
A caution and discretion should be used.

This however does not mean that we can't standardize on ways to do each
of the three things.
ELAPI should eventually become our logging api, it can be used for
debugging too so it will cover these two.
But tracing should be very low level and very simple conditionally
compiled printout statements that would allow tracing the ELAPI itself.

-- 
Thank you,
Dmitri Pal

Engineering Manager IPA project,
Red Hat Inc.


-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the Freeipa-devel mailing list