[lttng-dev] [LTTng-UST RFC] Tracepoint Loglevels Specification
Alexandre Montplaisir
alexandre.montplaisir at polymtl.ca
Thu Feb 2 11:56:34 EST 2012
On 12-02-02 10:56 AM, Mathieu Desnoyers wrote:
> [...]
>
> Indeed, as we dig further down within a process, we have to use static
> compile-time/link-time entities to specify a smaller granularity.
>
> The reason why I propose these entities rather than more free-form
> "major/minor" is because I think we really need to impose pre-defined
> loglevels that will allow selection of verbosity across the entire
> system (all applications) in a pre-defined way. If the semantic is too
> loose, then we miss the ability to let users know what is happening when
> they select "minor" instead of "major", because these identifiers do not
> map to anything concrete for the user.
But then again, this granularity will be just as good as the people who
use it when instrumenting their programs.
Looking at this quickly, I think 15 different levels is too much. It
should be limited to 5 imo. (less is more!) I understand you want to
pre-define stuff for the user's sake, but in practice I doubt this will
be used as intended. Some (few) programmers will use everything
correctly and religiously, some others will only use 1-3, some will only
use TRACE_DEBUG, and so on, so it would be just as hard, if not harder,
for the end users trying to make sense out of it.
>
> I changed the detailed part of the list this morning, removing "object"
> and "class". New list:
>
> * TRACE_EMERG 0
> * system is unusable
> *
> * TRACE_ALERT 1
> * action must be taken immediately
> *
> * TRACE_CRIT 2
> * critical conditions
> *
> * TRACE_ERR 3
> * error conditions
> *
> * TRACE_WARNING 4
> * warning conditions
> *
> * TRACE_NOTICE 5
> * normal, but significant, condition
> *
> * TRACE_INFO 6
> * informational message
> *
> * TRACE_SYSTEM 7
> * information has system-level scope (set of programs)
> *
> * TRACE_PROGRAM 8
> * information has program-level scope (set of processes)
> *
> * TRACE_PROCESS 9
> * information has process-level scope (set of modules)
> *
> * TRACE_MODULE 10
> * information has module (executable/library) scope (set of units)
> *
> * TRACE_UNIT 11
> * information has compilation unit scope (set of functions)
> *
> * TRACE_FUNCTION 12
> * information has function-level scope
> *
> * TRACE_DEFAULT 13
> * default trace loglevel (TRACEPOINT_EVENT default)
> *
> * TRACE_VERBOSE 14
> * verbose information
> *
> * TRACE_DEBUG 15
> * debug-level message (trace_printf default)
>
> Thoughts ?
>
> Mathieu
>
--
Alexandre Montplaisir
DORSAL lab,
École Polytechnique de Montréal
More information about the lttng-dev
mailing list