mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Fix unicode log errors
This commit is contained in:
parent
ad61e23d92
commit
c4fc94ea34
2 changed files with 4 additions and 5 deletions
|
@ -43,10 +43,9 @@ def get_log_tail(window=20, parsed=True, log_type="server"):
|
|||
clean_lines = []
|
||||
for i in log_lines:
|
||||
try:
|
||||
i = helpers.latinToAscii(i)
|
||||
log_time = i.split(' [')[0]
|
||||
log_level = i.split('] ', 1)[1].split(' - ', 1)[0]
|
||||
log_msg = i.split('] ', 1)[1].split(' - ',1)[1]
|
||||
log_msg = unicode(i.split('] ', 1)[1].split(' - ', 1)[1], 'utf-8')
|
||||
full_line = [log_time, log_level, log_msg]
|
||||
clean_lines.append(full_line)
|
||||
except:
|
||||
|
|
|
@ -2316,8 +2316,8 @@ class WebInterface(object):
|
|||
# Add traceback message to previous msg.
|
||||
tl = (len(filt) - 1)
|
||||
n = len(l) - len(l.lstrip(' '))
|
||||
l = ' ' * (2 * n) + l[n:]
|
||||
filt[tl][2] += '<br>' + l
|
||||
ll = ' ' * (2 * n) + unicode(l[n:], 'utf-8')
|
||||
filt[tl][2] += '<br>' + ll
|
||||
continue
|
||||
|
||||
log_levels = ['DEBUG', 'INFO', 'WARNING', 'ERROR']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue