cryptonas-branches/pythonrewrite/plugins/logs/logs.py
lars de3280806f language namespace for plugins separated
plugin interface changed ("prepareForm" removed)
plugins do not raise exceptions anymore
first part of the partitioning plugin
device-specific stuff moved to CryptoBoxTools
2006-09-14 12:33:01 +00:00

21 lines
420 B
Python

def doAction(hdf, cbox):
__prepareFormData(hdf,cbox)
return "show_log"
def getStatus(cbox):
return "%s:%s:%s" % (
cbox.prefs["Log"]["Level"],
cbox.prefs["Log"]["Destination"],
cbox.prefs["Log"]["Details"])
def __prepareFormData(hdf, cbox):
hdf["Data.Plugins.logs.Content"] = __getLogContent(cbox)
def __getLogContent(cbox, lines=30, maxSize=2000):
return "<br/>".join(cbox.getLogData(lines, maxSize))