cryptonas-branches/pythonrewrite/plugins/logs/logs.py
lars dba8ca79fd plugin interface implemented
example plugins added: date and network
moved "logs" to plugins
2006-09-12 08:55:20 +00:00

21 lines
433 B
Python

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