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
Methods
__init__
(logger, title, message[, level, objs])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 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_LONG
CREATION_COUNT
ERROR
INFO
INSTANCE_UUID
SEVERE
base_cls
Return the base class base_cls_name
Return the name of the base class cls
Return the class name as a string