2626import traceback as _traceback
2727import os as _os
2828import logging as _logging
29- if _sys .version_info >= (3 ,3 ):
30- from collections import ChainMap as _ChainMap
3129from syslog import (LOG_EMERG , LOG_ALERT , LOG_CRIT , LOG_ERR ,
3230 LOG_WARNING , LOG_NOTICE , LOG_INFO , LOG_DEBUG )
31+ if _sys .version_info >= (3 ,3 ):
32+ from collections import ChainMap as _ChainMap
33+
3334from ._journal import __version__ , sendv , stream_fd
3435from ._reader import (_Reader , NOP , APPEND , INVALIDATE ,
3536 LOCAL_ONLY , RUNTIME_ONLY ,
@@ -225,8 +226,8 @@ def __next__(self):
225226 def add_match (self , * args , ** kwargs ):
226227 """Add one or more matches to the filter journal log entries.
227228
228- All matches of different field are combined in a logical AND, and
229- matches of the same field are automatically combined in a logical OR.
229+ All matches of different field are combined with logical AND, and
230+ matches of the same field are automatically combined with logical OR.
230231 Matches can be passed as strings of form "FIELD=value", or keyword
231232 arguments FIELD="value".
232233 """
@@ -241,7 +242,7 @@ def get_next(self, skip=1):
241242 Entries will be processed with converters specified during Reader
242243 creation.
243244
244- Optional skip value will return the `skip`\ -th log entry.
245+ Optional ` skip` value will return the `skip`-th log entry.
245246
246247 Currently a standard dictionary of fields is returned, but in the
247248 future this might be changed to a different mapping type, so the
@@ -261,7 +262,7 @@ def get_previous(self, skip=1):
261262
262263 Equivalent to get_next(-skip).
263264
264- Optional skip value will return the -`skip`\ -th log entry.
265+ Optional ` skip` value will return the -`skip`-th log entry.
265266
266267 Entries will be processed with converters specified during Reader
267268 creation.
@@ -561,7 +562,7 @@ def emit(self, record):
561562 msg = self .format (record )
562563 pri = self .mapPriority (record .levelno )
563564 mid = getattr (record , 'MESSAGE_ID' , None )
564- extras = { k :str (v ) for k ,v in self ._extra .items () }
565+ extras = {k :str (v ) for k ,v in self ._extra .items ()}
565566 extras .update ({
566567 k :str (v ) for k ,v in record .__dict__ .items ()
567568 })
0 commit comments