MCPcopy
hub / github.com/beeware/toga / log

Method log

dummy/src/toga_dummy/utils.py:29–40  ·  view source on GitHub ↗

Add an entry to the event log. :param logtype: The type of object being logged (SET_VALUE, etc.) :param instance: The instance that generated loggable activity :param context: A dictionary of data related to the event. The contents of the dictionary will depend o

(cls, logtype, instance, **context)

Source from the content-addressed store, hash-verified

27
28 @classmethod
29 def log(cls, logtype, instance, **context):
30 """Add an entry to the event log.
31
32 :param logtype: The type of object being logged (SET_VALUE, etc.)
33 :param instance: The instance that generated loggable activity
34 :param context: A dictionary of data related to the event. The contents
35 of the dictionary will depend on the event that occurred.
36 :returns: The sequence value of the log entry
37 """
38 entry = LogEntry(logtype, instance, **context)
39 cls._log.append(entry)
40 return entry.sequence
41
42 @classmethod
43 def values(cls, instance, attr):

Callers 3

_set_valueMethod · 0.80
_get_valueMethod · 0.80
_actionMethod · 0.80

Calls 2

LogEntryClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected