v19 Addon Logging Deprecation: NOTICE/SEVERE levels to be deprecated by end of June '20
#1
All,

Recently Kodi 19 moved to using spdlog in its core. This meant a cleanup of the log levels kodi has had for many years. Both the NOTICE and SEVERE levels are now redundant and INFO and FATAL should now be used in their place respectively. Kodi will then use the following set of level for logging: DEBUG, INFO, WARNING, ERROR and FATAL.

Python addons only ever used the xbmc.LOGNOTICE level (SEVERE was never exposed in the API). Work is already underway to update the binary addons starting with PVR. The deprecated log levels have all been changed in Kodi in this PR: 17730 (PR).

NOTICE and SEVERE will deprecated from all APIs by the end of June.

As there are some python addons already in the matrix repo using xbmc.LOGNOTICE I will provide list of those on this thread later today.

Regards,

phunkyfish.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#2
Addons/files using this in repo-scripts:

Code:

./script.plex/service.py
./script.plex/lib/util.py
./script.plex/lib/windows/kodigui.py
./script.plex/lib/main.py
./script.plex/lib/kodijsonrpc.py
./script.module.xbmcswift2/lib/xbmcswift2/logger.py
./script.speedfaninfo/resources/lib/spid.py
./script.speedfaninfo/default.py
./script.embuary.helper/resources/lib/helper.py
./script.embuary.info/resources/lib/helper.py
./script.artistslideshow/resources/lib/artistslideshow.py
./script.artistslideshow/default.py
./script.module.web-pdb/libs/web_pdb/logging.py
./script.metadata.editor/resources/lib/helper.py
./service.subtitles.rvm.addic7ed/addic7ed/utils.py
./script.service.next-episode/libs/logger.py
./script.module.addon.signals/lib/AddonSignals.py
./script.xbmc.lcdproc/resources/lib/lcdproc.py
./script.xbmc.lcdproc/resources/lib/common.py
./script.xbmc.lcdproc/resources/lib/lcdbase.py
./script.module.python.twitch/resources/lib/twitch/log.py

Addons/files using this in repo-plugins:

Code:

./plugin.audio.mixcloud/lib/utils.py
./plugin.video.twitch/resources/lib/twitch_addon/service.py
./plugin.video.twitch/resources/lib/twitch_addon/addon/common/log_utils.py
./plugin.video.twitch/resources/lib/twitch_addon/addon/common/url_dispatcher.py
./plugin.video.composite_for_plex/resources/lib/composite_addon/addon/logger.py
./plugin.video.imdb.trailers/resources/lib/imdb_trailers.py
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#3
I've fixed my two and am prepping for submission.  Thanks for letting us know about this.  Out of curiosity, will INFO be logged by default in Kodi 19 instead of NOTICE, or are we down to just WARNING, ERROR, and FATAL if we want to log something to the regular Kodi log file (i.e. without debug logging on in Kodi).  I noticed that in Kodi 18 at least, INFO is only logged when debug logging is one. It's not a huge deal, but I used to use NOTICE just to log that my addon had started and stopped so there was some little note in the log. I changed those to INFO, but obviously in Kodi 18 that now means my addons are completely silent in the log.

Yes, I know I could just change this for Kodi 19, but I'm holding onto the hope that I can keep my code the same for Kodi 18/19 (since I already did all the work to make them Python 2/3 compatible) and just update the addon.xml as needed.
Leia Estuary mod: 333143 (thread)
Artist Slideshow: Add-on:Artist_Slideshow (wiki)
Audio Profiles: Add-on:Audio_Profiles (wiki)
SpeedFan Information Display: Add-on:SpeedFan_Information_Display (wiki)
Reply
#4
Yes, that is exactly the change. INFO is the new NOTICE.

So DEBUG+all others in debug mode and only INFO, WARNING, ERROR and FATAL in normal.

You are correct on the impact, INFO would not be seen in Kodi 18.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Addon Logging Deprecation: NOTICE/SEVERE levels to be deprecated by end of June '2000
This forum uses Lukasz Tkacz MyBB addons.