mirror of
https://github.com/markqvist/Sideband.git
synced 2025-07-21 22:19:06 -04:00
Squelch excessive logging
This commit is contained in:
parent
cf6d88f17e
commit
f531b2ecaa
4 changed files with 37 additions and 1 deletions
|
@ -52,6 +52,21 @@ from mapview import CustomMapMarker
|
|||
from mapview.mbtsource import MBTilesMapSource
|
||||
from mapview.source import MapSource
|
||||
|
||||
class redirect_log():
|
||||
def isEnabledFor(self, arg):
|
||||
return False
|
||||
def debug(self, arg):
|
||||
pass
|
||||
def trace(self, arg):
|
||||
pass
|
||||
def warning(self, arg):
|
||||
RNS.log("Kivy error: "+str(arg), RNS.LOG_WARNING)
|
||||
def critical(self, arg):
|
||||
RNS.log("Kivy error: "+str(arg), RNS.LOG_ERROR)
|
||||
|
||||
import kivy.core.image
|
||||
kivy.core.image.Logger = redirect_log()
|
||||
|
||||
if RNS.vendor.platformutils.get_platform() == "android":
|
||||
from sideband.core import SidebandCore
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue