Open shareefj opened 5 months ago
Good question. I have never really understood how the logging module really works.
Many of the modules have this line logger = logging.getLogger(__name__)
in it. Does that make any difference?
Heh, I was not expecting "I have never really understood how the logging module really works.". :-)
No, I tried that. It seems that the logging setup limits logging to only a few specific modules. It does that here: https://github.com/olofk/fusesoc/blob/main/fusesoc/utils.py#L134 Why? I have no idea and I'm in the same boat as you, I've never fully understood how advanced logging works. It continues to be a black art that I am not skilled in.
I assume that the person who wrote the logging features is no longer contributing?
I looked into the logs and it turns out @benreynwar did it with f4fad9131dabefedf830b40ecb3dfc6687131d86 back in 2017. Any clues, Ben? :)
I am also not skilled at logging! Which is probably why creating the logger didn't work with the code I wrote. @shareefj I expect the solution is to replace the logging code in utils.py with something better.
@benreynwar Thanks. I've never met anyone who does understand it. Ah well.
Can you remember why you limited the logging to just few modules? If we took that out would there be any negative side effects?
I don't remember. My guess is that I thought the fusesoc logging configuration should be limited to the fusesoc ecosystem. I don't see a problem with removing that limitation.
If I'm writing a script that uses
fusesoc.fusesoc.Fusesoc
, is there any way I can get a logger object to work using the default FuseSoC handler?