Description
I am playing with stdlib_logger
and I think it would be nice to have a subroutine for messages that should be printed only during debug phases.
Proposition
log_debug - Writes the string message
to self % log_units
Syntax
call self % log_debug( message [,module, procedure, stat, errmsg] )
Log levels
Log levels are used for filtering the messages based on their level/severity.
Each subroutine log_error
, log_information
, log_io_error
, log_text_error
, log_warning
, and the additional log_debug
is associated with a level.
For example:
log_debug
associated withdebug_level
log_information
associated withinformation_level
log_warning
associated withwarning_level
log_error
,log_io_error
,log_text_error
associated witherror_level
with debug_level
< information_level
< warning_level
< error_level
.
Since log_message
is called by all other log
subroutines, it is probably best to not assign a level to log_message
IMO.
The level of the logger should be set with the method configure
, e.g. call self %configure( level = information_level)
, meaning that all calls with a level < information_level
would be ignored.
Such log level options are avaible in Julia or Python loggers.
@wclodius2 , @milancurcic , @14NGiestas , @ivan-pi , @certik is that of interests? any thoughs, comments?