EzLogger

Verbosity Level Logging

Verbosity level is also called debug level. The verbosity level is a value from 1 to x. (Where x is the highest verbosity level)
Verbosity level logic can be a little confusing because a macro called with a lower value will log the most, and a macro called with a higher value will log the least.
When a verbosity level macro is called, the ezlogger class will compare it's verbosity level to the static (global) verbosity level. It does this by making a call to get_verbosity_level_tolerance()
If the ezlogger::m_verbosity_level verbosity level is greater than the value returned from get_verbosity_level_tolerance(), than NO logging is performed. If the value of ezlogger::m_verbosity_level is equal to or less than get_verbosity_level_tolerance(), than the logging is implemented.
The verbosity_level_tolerance can be set by calling axter::ezlogger<>::set_verbosity_level_tolerance();
Example usage:
axter::ezlogger<>::set_verbosity_level_tolerance(axter::log_rarely);
In the default verbosity level policy, 1 is represented by enum called axter::log_always.

Any logging called with this verbosity level will always log, regardless of the global verbosity level.
Verbosity level 2 is represented by axter::log_often.
Example usage:
EZLOGGERVLSTREAM(axter::log_often) << "This is data1 " << data1 << "This is data2 " << data2 << std::endl;
The above line will log the data if the global verbosity level is set to 2 or greater. If the global verbosity level is set to 1, than the above line will not log any data.

Verbostiy level 3 is represented by axter::log_regularly.
Example usage:
EZLOGGERVLSTREAM(axter::log_regularly) << "This is data1 " << data1 << "This is data2 " << data2 << std::endl;
The above line will log the data if the global verbosity level is set to 3 or greater. If the global verbosity level is set to 1 or 2, than the above line will not log any data.

Verbostiy level 4 is represented by axter::log_rarely.
Example usage:
EZLOGGERVLSTREAM(axter::log_rarely) << "This is data1 " << data1 << "This is data2 " << data2 << std::endl;
The above line will log the data if the global verbosity level is set to 4 or greater. If the global verbosity level is set to 1, 2, or 3, than the above line will not log any data.

Verbostiy level 5 is represented by axter::log_very_rarely.
Example usage:
EZLOGGERVLSTREAM(axter::log_very_rarely) << "This is data1 " << data1 << "This is data2 " << data2 << std::endl;
The above line will log the data if the global verbosity level is set to 5 or greater. If the global verbosity level is set to 1, 2, 3, or 4, than the above line will not log any data.


The default verbosity level policy only has five levels of verbosity. If more levels are required, a custom verbostiy level policy can be made. for more information, see ezlogger_verbosity_level_policy
Generated on Wed Mar 29 00:31:09 2006 for EzLogger by  doxygen 1.4.6.Axter [Axter-Extended-Version]