From: Andreas Monzner Date: Thu, 15 Nov 2007 19:43:03 +0000 (+0000) Subject: remove possibility to enable "webif" logging to file X-Git-Url: http://code.vuplus.com/gitweb/?a=commitdiff_plain;h=d219dffdaf0d7ee4efded9b1549a8eebf7ffa104;p=vuplus_dvbapp-plugin remove possibility to enable "webif" logging to file # PLEASE DONT ENABLE LOGGING BY DEFAULT (OR COMMIT TO PLUGIN CVS) # AND DONT ADD CONFIG OPTIONS WHICH HELPS NORMAL USERS TO ENABLE # THIS KIND OF LOGGING !!!!!!!!!!!!! # Twisted logging can't handle UTF8 correct, # and enigma2 internal completely use UTF8 (for debug messages too) # so the twisted logging code self generates frequently blue screens # at various places in enigma2(not only in Webif) and the reason # of this crashes is NOT visible in the normal enigma2 crashlogs # We have spent much time into debugging this Ghost 2007/11/15 --- diff --git a/webinterface/src/WebIfConfig.py b/webinterface/src/WebIfConfig.py index 6736602..7fae0b5 100644 --- a/webinterface/src/WebIfConfig.py +++ b/webinterface/src/WebIfConfig.py @@ -21,7 +21,6 @@ class WebIfConfigScreen(ConfigListScreen,Screen): self.list.append(getConfigListEntry(_("use Authorization"), config.plugins.Webinterface.useauth)) self.list.append(getConfigListEntry(_("use Port"), config.plugins.Webinterface.port)) self.list.append(getConfigListEntry(_("enable /hdd"), config.plugins.Webinterface.includehdd)) - self.list.append(getConfigListEntry(_("write debug-file"), config.plugins.Webinterface.debug)) self.list.append(getConfigListEntry(_("autowrite timer"), config.plugins.Webinterface.autowritetimer)) self.list.append(getConfigListEntry(_("load movie-length"), config.plugins.Webinterface.loadmovielength)) ConfigListScreen.__init__(self, self.list) diff --git a/webinterface/src/plugin.py b/webinterface/src/plugin.py index 768713ce..f1fcbb6 100644 --- a/webinterface/src/plugin.py +++ b/webinterface/src/plugin.py @@ -26,7 +26,6 @@ config.plugins.Webinterface.includehdd = ConfigYesNo(default = False) config.plugins.Webinterface.useauth = ConfigYesNo(default = False) # False, because a std. images hasnt a rootpasswd set and so no login. and a login with a empty pwd makes no sense config.plugins.Webinterface.autowritetimer = ConfigYesNo(default = False) config.plugins.Webinterface.loadmovielength = ConfigYesNo(default = False) -config.plugins.Webinterface.debug = ConfigYesNo(default = False) # False by default, not confgurable in GUI. Edit settingsfile directly if needed config.plugins.Webinterface.version = ConfigText(__version__) # used to make the versioninfo accessible enigma2-wide, not confgurable in GUI. @@ -38,6 +37,17 @@ config.plugins.Webinterface.version = ConfigText(__version__) # used to make the use tail -f to view this log """ +# PLEASE DONT ENABLE LOGGING BY DEFAULT (OR COMMIT TO PLUGIN CVS) +# AND DONT ADD CONFIG OPTIONS WHICH HELPS NORMAL USERS TO ENABLE +# THIS KIND OF LOGGING !!!!!!!!!!!!! +# Twisted logging can't handle UTF8 correct, +# and enigma2 internal completely use UTF8 (for debug messages too) +# so the twisted logging code self generates frequently blue screens +# at various places in enigma2(not only in Webif) and the reason +# of this crashes is NOT visible in the normal enigma2 crashlogs +# We have spent much time into debugging this Ghost 2007/11/15 + +DEBUG_TO_FILE=False DEBUGFILE= "/tmp/twisted.log" @@ -96,7 +106,7 @@ def startWebserver(session): if config.plugins.Webinterface.enable.value is not True: print "not starting Werbinterface" return False - if config.plugins.Webinterface.debug.value: + if DEBUG_TO_FILE: print "start twisted logfile, writing to %s" % DEBUGFILE startLogging(open(DEBUGFILE,'w'))