Posts: 1,533
Joined: Sep 2007
Reputation:
20
arnova
Team-Kodi Developer
Posts: 1,533
2008-09-29, 20:58
(This post was last modified: 2008-09-29, 22:10 by arnova.)
Does anyone out here know whether it's possible to log something to the xbmc.log with level NOTICE (so it also get's logged in loglevel 0) in Python. The only ones I know are "xbmc.output()" which outputs stuff at loglevel info (which only get logged in debug mode) and "xbmc.log()" which logs stuff at loglevel debug....
Thanks!
-= Team Kodi developer fueled by heavy metal =-
Posts: 4,997
Joined: May 2004
Reputation:
12
xbmc/utils/log.h has the constants for the different log levels. You can use CLog::Log(int level, char* fmt, ...) to log at whatever level you please.
BTW, LOGNOTICE is logged at default level. Only LOGINFO and LOGDEBUG are suppressed.
Posts: 4,997
Joined: May 2004
Reputation:
12
The only facilities in the xbmc module are as you described. output() which is LOGINFO and log() which is LOGFATAL. I'm not sure if this is intentional or an oversight during the evolution of XBMC and the module.
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
print should output to the log also at LOGNOTICE.