Mopidy debug logging under systemd

Your code to set the level to DEBUG will execute when the module is imported. But then later, when Mopidy actually starts running, it’ll set the logging level to INFO as defined in your config.

I’d personally scrap all that logging.conf and use the loglevels/* section within your mopidy.conf. So if I wanted to have DEBUG logging for just Mopidy-Spotify’s playlists module and TRACE debugging for the web module: I’d do:

[loglevels]
mopidy_spotify.playlists = DEBUG
mopidy_spotify.web = TRACE

But when I am developing I’d always be using a develop environment and regular stdout logging, not systemd. Not that it makes much different here when it comes to logging, it’s just generally easier to work with.