diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2016-07-14 13:30:52 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2016-12-09 11:26:15 +0100 |
commit | d89bbe11537abfceb3d0c7b62b9325fceaf51e32 (patch) | |
tree | 7bb9697a7a2aac29da8f529cdca44ee050023dc2 /alot/db/manager.py | |
parent | e2de9282a33a8906077a3d223d025367071bce6b (diff) |
Use logging's native string interpolation
Diffstat (limited to 'alot/db/manager.py')
-rw-r--r-- | alot/db/manager.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alot/db/manager.py b/alot/db/manager.py index be80b4dc..6dce8c44 100644 --- a/alot/db/manager.py +++ b/alot/db/manager.py @@ -114,7 +114,7 @@ class DBManager(object): # go through writequeue entries while self.writequeue: current_item = self.writequeue.popleft() - logging.debug('write-out item: %s' % str(current_item)) + logging.debug('write-out item: %s', str(current_item)) # watch out for notmuch errors to re-insert current_item # to the queue on errors @@ -329,7 +329,7 @@ class DBManager(object): process = FillPipeProcess(cbl(), stdout[1], stderr[1], pipe, fun) process.start() self.processes.append(process) - logging.debug('Worker process {0} spawned'.format(process.pid)) + logging.debug('Worker process %s spawned', process.pid) def threaded_wait(): # wait(2) for the process to die @@ -342,7 +342,7 @@ class DBManager(object): else: msg = 'exited successfully' - logging.debug('Worker process {0} {1}'.format(process.pid, msg)) + logging.debug('Worker process %s %s', process.pid, msg) self.processes.remove(process) # spawn a thread to collect the worker process once it dies @@ -352,8 +352,8 @@ class DBManager(object): def threaded_reader(prefix, fd): with os.fdopen(fd) as handle: for line in handle: - logging.debug('Worker process {0} said on {1}: {2}'.format( - process.pid, prefix, line.rstrip())) + logging.debug('Worker process %s said on %s: %s', + process.pid, prefix, line.rstrip()) # spawn two threads that read from the stdout and stderr pipes # and write anything that appears there to the log |