I am trying to guess how to turn off logging on a Hailo 8L device running on a Raspberry Pi 5. On another post on this forum I found someone mentioning
os.environ['HAILORT_LOG_LEVEL'] = 'debug'
There are files named hailort.log being created automatically with content like:
Is there a way to limit file logs to given log level? In the documentation there is no such environment variable and HAILORT_LOG_LEVEL suggested by @M_S has no effect.
I saw that variable, but haven’t tried it as its name suggest it is for console logs, not file logs. Now I tried it, but the behavior is still the same, the hailort.log file is filled with info logs, but I set the variable: HAILORT_CONSOLE_LOGGER_LEVEL=error
However, when I changed the variable to HAILORT_CONSOLE_LOGGER_LEVEL=info then the console is filled with info logs. So the variable works fine, but for the console logs, not the file logs.
The logging level in HailoRT is hard-coded based on the build type and cannot be overridden using an environment variable. If you need a different logging level, you will need to modify the HailoRT source code and rebuild it. You can see how it’s defined in lines 34–40 in the following file:
@KlausK my problem really stems from the fact, that my log is cluttered with info information that I can’t fix, and I did not get a help how to fix this. Please kindly take a look at the issue here