Syntax error in PsychoPy logging module

I get a syntax error in PsychoPy’s PTB logging code.
My code:

from psychopy import logging
log = logging.LogFile("WS_Dev.log", level = logging.DEBUG, filemode = "w")
logging.log(logging.DEBUG, "in getArguments()")

and the error message:

File "./myProject.py", line 119, in getArguments
    logging.log(logging.DEBUG, "in getArguments()")
  File "./myProject-env/lib/python3.8/site-packages/psychopy/logging.py", line 410, in log
    root.log(msg, level=level, t=t, obj=obj)
  File "./myProject-env/lib/python3.8/site-packages/psychopy/logging.py", line 282, in log
    if level < self.lowestTarget:
TypeError: '<' not supported between instances of 'str' and 'int'

macOS 12.2.1 (Monterey), 2017 MacBook Pro
PsychoPy 2021.2.3
psychtoolbox 3.0.18.2
Python 3.8

Do you have any code that looks like this? The error suggests that one variable is a string.

Thanks for your reply. The erroneous line of code is in PsychoPy’s own routine, not in my code.

Somebody on stackoverflow found there is an error in the documentation of logging.logg. I will try this again following their guidelines, and if it works then I will figure out how to submit a change to psychopy to fix this.