Skip to content

Commit

Permalink
Python Bindings: restore some DB logging removal changes
Browse files Browse the repository at this point in the history
c958845 was too agressive and removed
three references to database access itself (one is just a comment.)
  • Loading branch information
Bill Meek committed Apr 15, 2023
1 parent 055f4dc commit a9091d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mythtv/bindings/python/MythTV/logging.py
Expand Up @@ -23,14 +23,15 @@ def _donothing(*args, **kwargs):
pass

class DummyLogger( LOGLEVEL, LOGMASK, LOGFACILITY ):
def __init__(self, module=None): pass
def __init__(self, module=None, db=None): pass
def logTB(self, mask): pass
def log(self, mask, level, message, detail=None): pass
def __call__(self, mask, level, message, detail=None): pass

class MythLog( LOGLEVEL, LOGMASK, LOGFACILITY ):
"""
MythLog(module='pythonbindings', lstr=None, lbit=None) -> logging object
MythLog(module='pythonbindings', lstr=None, lbit=None, \
db=None) -> logging object
'module' defines the source of the message in the logs
'lstr' and 'lbit' define the message filter
Expand Down Expand Up @@ -251,8 +252,9 @@ def __new__(cls, *args, **kwargs):
cls._initlogger()
return super(MythLog, cls).__new__(cls)

def __init__(self, module='pythonbindings'):
def __init__(self, module='pythonbindings', db=None):
self.module = module
self.db = db

@classmethod
def _setlevel(cls, level):
Expand Down

0 comments on commit a9091d3

Please sign in to comment.