Skip to content

Commit

Permalink
Removed logging_handler bandaid
Browse files Browse the repository at this point in the history
  • Loading branch information
Gobberwart committed Sep 7, 2016
1 parent ff40720 commit f27a3c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions pokemongo_bot/event_handlers/colored_logging_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,4 @@ def handle_event(self, event, sender, level, formatted_msg, data):
formatted_msg = '[{}] {}'.format(event, formatted_msg)

logger = logging.getLogger(type(sender).__name__)
try:
getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8"))
except UnicodeDecodeError:
getattr(logger, level)(formatted_msg)
getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8"))
5 changes: 1 addition & 4 deletions pokemongo_bot/event_handlers/logging_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ def handle_event(self, event, sender, level, formatted_msg, data):
formatted_msg = '[{}] {}'.format(event, formatted_msg)

logger = logging.getLogger(type(sender).__name__)
try:
getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8"))
except UnicodeDecodeError:
getattr(logger, level)(formatted_msg)
getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8"))

0 comments on commit f27a3c2

Please sign in to comment.