Skip to content

Commit

Permalink
Merge pull request #93 from Netuitive/bugfix/concurrentlog
Browse files Browse the repository at this point in the history
Provide class ConcurrentRotatingFileHandler and import concurrent_log_handler before logging.FileConfig()

2nd of 3 PR's addressing #63
  • Loading branch information
codytipton authored Nov 30, 2018
2 parents c2a1953 + dd1bac3 commit 110a7c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/diamond/logging/handlers/concurrentloghandler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# coding=utf-8

from concurrent_log_handler import ConcurrentRotatingFileHandler as CRFH
import sys


class ConcurrentRotatingFileHandler(TRFH):

def flush(self):
try:
super(ConcurrentRotatingFileHandler, self).flush()
except IOError:
sys.stderr.write('ConcurrentRotatingFileHandler received a IOError!')
sys.stderr.flush()
1 change: 1 addition & 0 deletions src/diamond/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import logging
import concurrent_log_handler
import logging.config
import sys
import os
Expand Down

0 comments on commit 110a7c4

Please sign in to comment.