mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] don't truncate 'yunohost log display' log by default
This commit is contained in:
parent
5c02dec59c
commit
680b3a0793
1 changed files with 5 additions and 2 deletions
|
@ -121,7 +121,7 @@ def log_list(category=[], limit=None, with_details=False):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def log_display(path, number=50, share=False):
|
def log_display(path, number=None, share=False):
|
||||||
"""
|
"""
|
||||||
Display a log file enriched with metadata if any.
|
Display a log file enriched with metadata if any.
|
||||||
|
|
||||||
|
@ -201,7 +201,10 @@ def log_display(path, number=50, share=False):
|
||||||
# Display logs if exist
|
# Display logs if exist
|
||||||
if os.path.exists(log_path):
|
if os.path.exists(log_path):
|
||||||
from yunohost.service import _tail
|
from yunohost.service import _tail
|
||||||
logs = _tail(log_path, int(number))
|
if number:
|
||||||
|
logs = _tail(log_path, int(number))
|
||||||
|
else:
|
||||||
|
logs = read_file(log_path)
|
||||||
infos['log_path'] = log_path
|
infos['log_path'] = log_path
|
||||||
infos['logs'] = logs
|
infos['logs'] = logs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue