You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the application there are console logging statements all around the code base like that:
from logs import lg
...
if _Debug:
lg.out(_DebugLevel, 'something is happening here')
This kind of logging mechanism is usually used for debugging of a single python module: _Debug and _DebugLevel variables are defined in every single python file. This helps during development and testing, but in production code _Debug is always set to False in all of the files - so no output is going to the console from those logging statements.
Also, application uses another kind of logging methods to print some "more important" information in the console during run-time: debug, info, warning, error and exception logging statements can be also used:
from logs import lg
...
lg.warning('this is a warning message')
By default debug logging level is 0 when you installed app for the first time.
It is possible to quickly change the debug level in the app settings via console command:
bitdust set debug 20
The problem is that the global debug level setting only controls the first logging mechanism (which uses _Debug and _DebugLevel variables in every python module) but not the second logging mechanism which uses info, warn, err, etc...
We can improve the app logging in a different ways.
For example we can make possible to turn on/off via program settings each logging statement individually:
bitdust set debug warning off
It would be also very useful to be able to turn on/off the _Debug-based logging for every individual module during run-time, which is not possible at the moment. For example:
bitdust set debug p2p.p2p_service on
The text was updated successfully, but these errors were encountered:
In the application there are console logging statements all around the code base like that:
This kind of logging mechanism is usually used for debugging of a single python module:
_Debug
and_DebugLevel
variables are defined in every single python file. This helps during development and testing, but in production code_Debug
is always set toFalse
in all of the files - so no output is going to the console from those logging statements.Also, application uses another kind of logging methods to print some "more important" information in the console during run-time:
debug
,info
,warning
,error
andexception
logging statements can be also used:Both of those logging mechanisms are implemented in the
logs.lg
module : https://github.com/bitdust-io/devel/blob/master/logs/lg.pyThere is a global setting that defines "global debug level" which controls how much logging information will be printed in the console during run-time: https://github.com/bitdust-io/devel/blob/master/main/config_types.py#L79
By default debug logging level is 0 when you installed app for the first time.
It is possible to quickly change the debug level in the app settings via console command:
The problem is that the global debug level setting only controls the first logging mechanism (which uses
_Debug
and_DebugLevel
variables in every python module) but not the second logging mechanism which usesinfo
,warn
,err
, etc...We can improve the app logging in a different ways.
For example we can make possible to turn on/off via program settings each logging statement individually:
It would be also very useful to be able to turn on/off the
_Debug
-based logging for every individual module during run-time, which is not possible at the moment. For example:The text was updated successfully, but these errors were encountered: