From 680b3a0793890a495c74c2b375fbe99ab44cb21e Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 21 Jul 2019 19:43:55 +0200 Subject: [PATCH] [mod] don't truncate 'yunohost log display' log by default --- src/yunohost/log.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 8f8c92010..3a4e447f6 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -121,7 +121,7 @@ def log_list(category=[], limit=None, with_details=False): 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. @@ -201,7 +201,10 @@ def log_display(path, number=50, share=False): # Display logs if exist if os.path.exists(log_path): 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['logs'] = logs