diff options
author | Christian Korber <ckorber@tdt.de> | 2024-07-03 13:55:43 +0200 |
---|---|---|
committer | Paul Donald <newtwen+github@gmail.com> | 2024-07-23 00:41:47 +0200 |
commit | 734442a10b4470dab6e41214592f7b7870c27f83 (patch) | |
tree | 576be6c3ac698fb6736ff69882974194b8734caf /modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js | |
parent | 7ebdefe7aefb231635e30d53184a836fd7af6545 (diff) |
luci-mod-status: display log_file in status if defined
Commit includes wrapper syslog in /usr/libexec. If a log file is configured, the output of this file is displayed. Otherwise the output of logread is displayed.
Signed-off-by: Christian Korber <ckorber@tdt.de>
Diffstat (limited to 'modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js')
-rw-r--r-- | modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js index 2aa3c46093..83a42cdbbf 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/syslog.js @@ -7,12 +7,11 @@ return view.extend({ retrieveLog: async function() { return Promise.all([ - L.resolveDefault(fs.stat('/sbin/logread'), null), - L.resolveDefault(fs.stat('/usr/sbin/logread'), null) + L.resolveDefault(fs.stat('/usr/libexec/syslog-wrapper'), null) ]).then(function(stat) { - var logger = stat[0] ? stat[0].path : stat[1] ? stat[1].path : null; + var logger = stat[0].path; - return fs.exec_direct(logger, [ '-e', '^' ]).then(logdata => { + return fs.exec_direct(logger).then(logdata => { const loglines = logdata.trim().split(/\n/); return { value: loglines.join('\n'), rows: loglines.length + 1 }; }).catch(function(err) { |