Merge commit 'origin/master' into HEAD
[urisagit/Stem.git] / Design / debug_notes
CommitLineData
4536f655 1 Stem::Debug Design Notes
2
3Stem modules have a need to report error conditions and trace critical
4events while being able to control when, where and how this information
5is presented. The Stem::Debug module provides a way for any Stem module
6to create debug/trace subs customized to that module's needs.
7Stem::Debug delegates all of this backend filtering, formatting and
8distribution of these messages to the Stem::Log subsystem. In effect,
9Stem::Debug creates specialized front ends subs to Stem::Log.
10
11Using Stem::Debug is very simple. A module just does a use Stem::Debug
12statement with optional key/value parameters. More than one use
13statement can be made in a module and each one will create a new debug sub
14inside that module's namespace. When you create this sub, you can select
15its name, which logical log the message goes to, and the label and severity
16levels. Also a command line argument name may be specified for filtering
17even before the log entry is generated.
18
19The final design of the Stem::Debug is still in flux. It is not yet
20ready to be used by external developers.
21
22This module is only used internally and should not be configured.