mirror of
https://github.com/9001/copyparty.git
synced 2025-08-22 11:22:21 -06:00
show severity in logs with no-ansi; #616
This commit is contained in:
parent
98d117b8ad
commit
d4cf42e760
|
@ -1464,7 +1464,14 @@ class SvcHub(object):
|
||||||
|
|
||||||
fmt = "\033[36m%s \033[33m%-21s \033[0m%s\n"
|
fmt = "\033[36m%s \033[33m%-21s \033[0m%s\n"
|
||||||
if self.no_ansi:
|
if self.no_ansi:
|
||||||
fmt = "%s %-21s %s\n"
|
if c == 1:
|
||||||
|
fmt = "%s %-21s CRIT: %s\n"
|
||||||
|
elif c == 3:
|
||||||
|
fmt = "%s %-21s WARN: %s\n"
|
||||||
|
elif c == 6:
|
||||||
|
fmt = "%s %-21s BTW: %s\n"
|
||||||
|
else:
|
||||||
|
fmt = "%s %-21s LOG: %s\n"
|
||||||
if "\033" in msg:
|
if "\033" in msg:
|
||||||
msg = RE_ANSI.sub("", msg)
|
msg = RE_ANSI.sub("", msg)
|
||||||
if "\033" in src:
|
if "\033" in src:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
[global]
|
[global]
|
||||||
e2dsa # enable file indexing and filesystem scanning
|
e2dsa # enable file indexing and filesystem scanning
|
||||||
e2ts # enable multimedia indexing
|
e2ts # enable multimedia indexing
|
||||||
ansi # enable colors in log messages
|
ansi # enable colors in log messages (both in logfiles and stdout)
|
||||||
|
|
||||||
# q, lo: /cfg/log/%Y-%m%d.log # log to file instead of docker
|
# q, lo: /cfg/log/%Y-%m%d.log # log to file instead of docker
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue