I’ve been having trouble migrating my OOT module to GR 3.10 (currently testing 
with 3.10.5) due to the Python block logging levels not working as they did 
prior to 3.10.  Currently, I have a parameter on most of my blocks to 
selectively set the log level per block instance to help filter what is 
printing, however, it doesn’t seem this works anymore.

The way I have it implemented is in the __init__ function of my blocks I run:
    self.logger = gr.logger(self.alias())
    self.logger.set_level(log_level)

Then elsewhere in the class issue logging statements as usual: 
self.logger.debug(f’some debug message')

In GR 3.9, this would print “some debug message” if that block’s log_level was 
set to debug. However, now in 3.10 it appears nothing is being printed to 
stdout at all, regardless of log level.

I’m aware there have been some changes in the logger in 3.10, but the OOT 
porting guide suggests the only that need to be made are with the C++ logger 
(and that the old logging API still works—for now).

Are there any changes that must be made to the Python logger too?

Thanks in advance!
Jason

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to