kernel_tuner icon indicating copy to clipboard operation
kernel_tuner copied to clipboard

Logging update

Open jiskattema opened this issue 4 years ago • 1 comments

Change the python logging code. Each python file now logs using its own logger instance with the filename (from name) as name.

This should solve some issues with logging not reaching stdout.

jiskattema avatar Mar 01 '21 10:03 jiskattema

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Mar 01 '21 10:03 sonarqubecloud[bot]

Hi Ben! Is this work still useful? Or did you copy/apply the fixes yourself? Please close the pull request if it's not needed anymore.

jiskattema avatar Oct 11 '22 13:10 jiskattema

Hi Jisk,

Thanks! I was indeed discussing the status of logging within the code earlier this week with Alessio. We are considering to remove the logging code from Kernel Tuner, since neither of us have used logging in our development in a long while and keeping the logging code alive and up to date is becoming more work than it saves us. Of course, I would like to thank you for your work on the logging code. At this point, I think it's probably just better if we remove logging from the code altogether to avoid its maintenance. I hope you don't mind.

Best, Ben

benvanwerkhoven avatar Oct 11 '22 14:10 benvanwerkhoven

I think having some logging can be very useful -- it was very helpful when i tried debugging using kernel turner for some other use cases: openmp / fortran. The compilers have matured a lot since then, but just removing all logging seems a waste. If you want, i can try to get this working again?

jiskattema avatar Oct 11 '22 14:10 jiskattema

i could rebase my (minimal) changes -- but i can't seem to re-run the checks.

I think removing the logging would be a mistake: the first thing anyone will do when adding a different backend or compiler is to start adding this kind of output again. I can understand removing some log statements but to axe all of it seems a pity.

jiskattema avatar Oct 12 '22 15:10 jiskattema

Hi Jisk! Indeed you have a point there! It would be great if you could help out with fixing the logging. It would probably be best to work from the current master indeed since the code has diverged quite a bit from the original pull request. I'll look into it myself as well, as I like to understand the logging process better. SonarCloud and PyLint also complain about the logging code every now and then, so we're clearly not doing this as they should be right now. I also bookmarked this a while ago for later reading (I guess for me this should be sooner rather than later now), perhaps it's useful for you as well: https://guicommits.com/how-to-log-in-python-like-a-pro/

benvanwerkhoven avatar Oct 12 '22 16:10 benvanwerkhoven