adaptivemd.LogEntry¶
-
class
adaptivemd.LogEntry(logger, title, message, level=3, objs=None)[source]¶ A storable representation of a log entry
Examples
>>> p = Project('tutorial-project') >>> l = LogEntry('worker', 'failed execution', 'simsalabim, didnt work') >>> print l >>> p.logs.add(l)
Variables: - logger (str) – the name of the logger for classification
- title (str) – a short title for the log entry
- message (str) – the long and detailed message
- level (int) – pick LogEntry.SEVERE, LogEntry.ERROR or LogEntry.INFO (default)
- objs (dict of storable objects) – you can attach objects that can help with specifying the error message
-
__init__(logger, title, message, level=3, objs=None)[source]¶ x.__init__(…) initializes x; see help(type(x)) for signature
Methods
__init__(logger, title, message[, level, objs])x.__init__(…) initializes x; see help(type(x)) for signature args()Return a list of args of the __init__ function of a class base()Return the most parent class actually derived from StorableMixin descendants()Return a list of all subclassed objects from_dict(dct)Reconstruct an object from a dictionary representation get_uuid()Create a new unique ID :returns: the unique number for an object in the project :rtype: long idx(store)Return the index which is used for the object in the given store. named(name)Attach a .name property to an object objects()Returns a dictionary of all storable objects to_dict()Convert object into a dictionary representation Attributes
ACTIVE_LONGCREATION_COUNTERRORINFOINSTANCE_UUIDSEVEREbase_clsReturn the base class base_cls_nameReturn the name of the base class clsReturn the class name as a string