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
{{ message }}
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
Various print() exists throughout pycrate, that should be moved to a proper logging mechanism, in order to not eventually pollute stdout. All logging should be done with the log() function in ./pycrate_core/utils.py, and this log function should do a proper logging instead of just a print.
This should apply to all part of the library, except the pycrate_corenet part which has already a specific handling for logs, and the tools which have to print.
Places where explicit print() should be changed to log():
./pycrate_ether/IP.py
The text was updated successfully, but these errors were encountered:
Various print() exists throughout pycrate, that should be moved to a proper
logging mechanism, in order to not eventually pollute stdout. All logging
should be done with the log() function in ./pycrate_core/utils.py, and
this log function should do a proper logging instead of just a print.
It's more work, but better to call log(...) directly in the module where the event occurs.
The reason for this is with the boilerplate (in every module):
importlogginglog=logging.getLogger(__name__)
Then the log object will have a name matching the name of the module, which
makes it easy to see where in the library the message was generated.
If you centralise the call, everything will look like it came from pycrate_core.utils
Yes, I realize this while reading the logging module doc and tested it.
This will require changes in many files : I'll do it when I a have proper time.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Various
print()
exists throughout pycrate, that should be moved to a proper logging mechanism, in order to not eventually pollute stdout. All logging should be done with thelog()
function in./pycrate_core/utils.py
, and this log function should do a proper logging instead of just a print.This should apply to all part of the library, except the
pycrate_corenet
part which has already a specific handling for logs, and thetools
which have to print.Places where explicit
print()
should be changed tolog()
:The text was updated successfully, but these errors were encountered: