15 lines
348 B
Python
15 lines
348 B
Python
import clementine
|
|
import logging
|
|
|
|
|
|
class ClementineLogHandler(logging.Handler):
|
|
def emit(self, record):
|
|
clementine.pythonengine.HandleLogRecord(
|
|
record.levelno, record.name, record.lineno, record.getMessage())
|
|
|
|
|
|
def setup_logging():
|
|
root = logging.getLogger()
|
|
root.addHandler(ClementineLogHandler())
|
|
root.setLevel(logging.NOTSET)
|