Solved: Logging of extension does not work


while developing an extension I want to use the logging capabilities. From Mopidy Documentation I know about loglevels and my config looks like

config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log


keys = root

keys = fileHandler

keys = simpleFormatter

handlers = fileHandler

class = FileHandler
formatter = simpleFormatter
level = INFO
args = ('/var/log/mopidy/mopidy.log',)

format = %(asctime)s %(levelname)s [%(process)d:%(threadName)s] %(name)s: %(message)s
datefmt =


However, I don’t get any debug output from my tpa2016d2 extension. Neither in console output nor in /var/log/mopidy/mopidy.log

I read the discussion at Is loglevels/* still working? but I’m not quite sure what the latest state is.
Any hints, what I’m doing wrong?

[loglevels] is a Mopidy config setting which should be defined in your mopidy.conf. The logging.conf config_file is parsed by Python’s logging module, I’m pretty sure it doesn’t understand anything under [loglevels].

The state as described in the github issue will be accurate. Since you are developing an extension I am guessing you care about “case 1”. In which case if you define those loglevels in the right place (mopidy.conf) it should work.

Stupid me, thanks for pointing it out. It works as expected.