8000 fix small bugs of structuring in formatter. · ksato9700/fluent-logger-python@cc62bfc · GitHub
[go: up one dir, main page]

Skip to content

Commit cc62bfc

Browse files
author
Masahiro Yamauchi
committed
fix small bugs of structuring in formatter.
1 parent 5f2aaa3 commit cc62bfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fluent/handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ def _structuring(self, data, msg):
3535
self._add_dic(data, msg)
3636
elif isinstance(msg, str):
3737
try:
38-
self.add_dic(data, json.loads(str(msg)))
38+
self._add_dic(data, json.loads(str(msg)))
3939
except:
4040
pass
4141

4242
def _add_dic(self, data, dic):
4343
for k, v in dic.items():
44-
if isinstance(k, str):
44+
if isinstance(k, str) or isinstance(k, unicode):
4545
data[str(k)] = v
4646

4747
class FluentHandler(logging.Handler):

0 commit comments

Comments
 (0)
0