-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stdlib_logger: proposition to add a logger for debug phases and levels among the different logs #254
Comments
A few comments. This is really two separate proposals" adding |
I agree with you that it should be two separate PR. Re: call self % log_debug( message [, module, procedure ] ) Here is a draft of
The proposed approach in this message is similar to Julia and Python loggers. Here is a draft for a proposition similar to Julia and Python loggers.
I don't understand that. For example, we could verify that a message is not printed to
Right. Default levels should be discussed first and set accordingly.
I am not sure what is tricky with the option |
The draft and the proposition for testing look mostly reasonable. A few comments on it:
|
Thank you for your comments. I integrated them, and submitted a first PR (#256) for adding |
Great! |
This issue was solved 9 Dec 2020 by #261 and probably can be closed. |
I'm closing this issue since it was solved and merged in #261 . |
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
toself % 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 additionallog_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 otherlog
subroutines, it is probably best to not assign a level tolog_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?
The text was updated successfully, but these errors were encountered: