From db3735d9745f948268dbbe43c24caf3614f140c4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 3 Apr 2025 19:58:57 +0100 Subject: mod_admin_shell: Visual tweaks to the output of debug:cert_index() --- plugins/mod_admin_shell.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 56bc3cc9..d6d082f3 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -2410,10 +2410,17 @@ function def_env.debug:cert_index(path) local sink = logger.add_simple_sink(function (source, level, message) if source == "certmanager" then - self.session.print(source, level, message); + if level == "debug" or level == "info" then + level = "II"; + elseif level == "warn" or level == "error" then + level = "EE"; + end + self.session.print(level..": "..message); end end); + print("II: Scanning "..path.."..."); + local index = {}; cm.index_certs(path, index) @@ -2436,7 +2443,7 @@ function def_env.debug:cert_index(path) { title = "Service", width = 5 }; }, self.session.width); print(row()); - + print(("-"):rep(self.session.width or 80)); for domain, certs in it.sorted_pairs(index) do for cert_file, services in it.sorted_pairs(certs) do for service in it.sorted_pairs(services) do -- cgit v1.2.3