Closed andyofmelbourne closed 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.
src/hummingbird.py:30 logging.basicConfig(format='%(filename)s:%(lineno)d %(message)s', level=level)
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.
logging.getLogger().setLevel(level)
Test: $./hummingbird.py -b -d
$./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
Thanks for the report! Should be fixed by 4a7a241.
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:
output with hack: