Skip to content

Commit b74b0c8

Browse files
committed
Add utf8 for logging.
1 parent 5be3f0f commit b74b0c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: coscupbot/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, bot_type, credentials, sheet_credentials, wit_tokens, db_url=
3434
self.start_scheduler()
3535

3636
def process_new_event(self, data):
37-
self.logger.info('Process new receives. %s' % data)
37+
self.logger.info('Process new receives. %s', data)
3838
receive = Receive(data)
3939
for r in receive:
4040
content = r['content']

Diff for: logging.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ formatter= console
2424
[handler_file]
2525
class= logging.handlers.RotatingFileHandler
2626
formatter= file
27-
args=('coscupbot.log', 'a', 10*1024*1024, 10)
27+
args=('coscupbot.log', 'a', 10*1024*1024, 10, 'utf-8')

0 commit comments

Comments
 (0)