-
Notifications
You must be signed in to change notification settings - Fork 137
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
DISCUSSION: Logger .. test, ideas and incorporating a global logging class #14
Comments
I like the idea 👍 The std |
Agree https://docs.python.org/3/howto/logging.html#logging-basic-tutorial seems to be reliable for this task. I let it open until I found a way to call this from the core, but we should start to use this logging instead of print() whenever possible. |
…st playground in testing/test_logger.py. Still need some tuning and we should collect experience.
made a little progress .. C++ part can now talk to the logger .. we now only need to define some defaults behavior |
great! |
hmm .. good point .. did not yet tested it but should be no problem since log(logging) needs two args (int, str) and log(logarithm) only can handle one arg (float|iterable) |
…st playground in testing/test_logger.py. Still need some tuning and we should collect experience.
Add new tests and syntax suggestions .. still work in progress and discussion is appreciated.
See testing/test_logger.py for more examples. |
new logger syntax to try .. less to type
|
Nice, this is handy and not more effort than a print statement. 👍 |
Several log levels would be nice: Quiet, Info, Debug, Insane, Warn, Error
ALL! output inside pygimli should write into the logger.
./appX --verbose should set the logger to 'Info'
./appX --debug should set pg.setDebug() and the logger to 'Debug'
-Quiet for default or gui mode, Warn=off, Error=on
-Insane only for internal use
Is there a way to extract the output from the logger for futher GUI usage?
Is it distinguishable between cout cerr?
check:
logging package
The text was updated successfully, but these errors were encountered: