FXIhub / hummingbird

Monitoring and Analysing flash X-ray imaging experiments
http://fxihub.github.io/hummingbird
BSD 2-Clause "Simplified" License
16 stars 14 forks source link

cannot set logging level with -v or -d #139

Closed andyofmelbourne closed 2 years ago

andyofmelbourne commented 2 years ago

For some reason the line: src/hummingbird.py:30 logging.basicConfig(format='%(filename)s:%(lineno)d %(message)s', level=level) does not set the logging level for me.

To get the logging level set I had to add the hack (see https://stackoverflow.com/questions/32681289/python-logging-wont-set-a-logging-level-using-basicconfig): logging.getLogger().setLevel(level) just below the above line.

Test: $./hummingbird.py -b -d

output without hack:

WARNING:root:No configuration file given! Loading example configuration from /home/andyofmelbourne/Documents/2022/Xavier_p003004/hummingbird/examples/basic/dummy.py
MPI rank 0, pid 182709
Starting event loop (event reader 1/1) ...
Processing Rate 9.84 Hz
Processing Rate 9.90 Hz

output with hack:

WARNING:root:No configuration file given! Loading example configuration from /home/andyofmelbourne/Documents/2022/Xavier_p003004/hummingbird/examples/basic/dummy.py
MPI rank 0, pid 182783
Starting event loop (event reader 1/1) ...
DEBUG:root:Initializing source 'photonPixelDetectors / CCD.'
DEBUG:root:Sending data on source 'photonPixelDetectors / CCD'
Processing Rate 9.82 Hz
DEBUG:root:Sending data on source 'photonPixelDetectors / CCD'
Processing Rate 9.90 Hz
FilipeMaia commented 2 years ago

Thanks for the report! Should be fixed by 4a7a241.