Currently, the Skill Development documentation does not seem to cover logging (https://mycroft-ai.gitbook.io/docs/skill-development/introduction). In examining a few skills, I see two or three “styles”, examples below. Maybe the “getLogger” function is just a helper method or something, I’m not really sure. What is the current recommended/preferred style of setting up and calling logging functions?
To be clear, I’m not trying to get logging to work, that is already achieved. I’m trying to be consistent and future-proof in the code.
in daily_meditation:
from mycroft.util.log import getLogger
...
LOGGER = getLogger(__name__)
...
LOGGER.error("Error: {0}".format(e))
in fallback-AIML and mycroft-mark-1.mycroftai::
from mycroft.util.log import LOG
...
LOG.info('Loading Brain')
in mycroft-timer.mycroftai and mycroft-spotify.forslund:
from mycroft.util.log import LOG
...
self.log.error('Couldn\'t allocate mixer, {}'.format(repr(e)))
...
self.log.info(dump)