mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Do not polute logs in clickhouse-test
In case of there are less then 100 lines, there is no need to split lines with '#', and in fact, it will only looks it odd and hard to interpret. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
95db6fb1a6
commit
72f61ae399
@ -76,7 +76,10 @@ def trim_for_log(s):
|
||||
if not s:
|
||||
return s
|
||||
lines = s.splitlines()
|
||||
return "\n".join(lines[:50] + ["#" * 100] + lines[-50:])
|
||||
if len(lines) > 100:
|
||||
return "\n".join(lines[:50] + ["#" * 100] + lines[-50:])
|
||||
else:
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
class HTTPError(Exception):
|
||||
|
Loading…
Reference in New Issue
Block a user