def add_log(self, level, msg, device_name=None, process=None):
"""
Add a log to the datastore.
:param level: Per spec https://docs.python.org/2/library/logging.html#logging-levels
with the additional log level of JOURNAL
:param process:
:param msg:
:param device_name: As explained in DataStore.list_devices()
:return: None
:raise DataStore Expection if the level is not a valid log level as sepecified in
Datastore.get_log_levels()
"""
if level not in self.get_log_levels():
raise DataStoreException("Invalid log level specified. Please use the appropriate level as determined"
"in Datastore.get_log_levels()")
评论列表
文章目录