+ for value in super(Journal, self).query_unique(key))
+
+ def seek_realtime(self, timestamp):
+ if isinstance(timestamp, datetime.datetime):
+ timestamp = float(timestamp.strftime("%s.%f"))
+ return super(Journal, self).seek_realtime(timestamp)
+
+ def seek_monotonic(self, timestamp, bootid=None):
+ if isinstance(timestamp, datetime.timedelta):
+ timestamp = timestamp.totalseconds()
+ return super(Journal, self).seek_monotonic(timestamp, bootid)
+
+ def log_level(self, level):
+ """Sets maximum log level by setting matches for PRIORITY."""
+ if 0 <= level <= 7:
+ for i in range(level+1):
+ self.add_match(PRIORITY="%s" % i)
+ else:
+ raise ValueError("Log level must be 0 <= level <= 7")
+
+ def this_boot(self):
+ """Add match for _BOOT_ID equal to current boot ID."""
+ self.add_match(_BOOT_ID=_id128.get_boot().hex)
+
+ def this_machine(self):
+ """Add match for _MACHINE_ID equal to the ID of this machine."""
+ self.add_match(_MACHINE_ID=_id128.get_machine().hex)