Trouble using a logger inside a Revit API event

I wrote a script that subscribes to the DocumentChanged Event in order to display information to the user. I am trying to use the provided pyRevit logger from the script module inside my function.

When I run any of my other scripts, this event function stops logging to the output window. The function still executes as normal, but stops printing my warnings.

Below is an example code that would be in the file. Unfortunately for me, everything needs to stay inside the file because my script doesn’t work in the hook otherwise.

logger = script.get_logger()

class App:
    def __init__(self, logger):
        self.logger = logger

    def func(self, sender, args):
        self.logger.warning("logging working")
        UI.TaskDialog.Show("func", "working")

# subscribe to the document changed event += framework.EventHandler[