summaryrefslogtreecommitdiffstats
path: root/dovecot-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'dovecot-model.lua')
-rw-r--r--dovecot-model.lua16
1 files changed, 10 insertions, 6 deletions
diff --git a/dovecot-model.lua b/dovecot-model.lua
index 74aff69..e2cd0f0 100644
--- a/dovecot-model.lua
+++ b/dovecot-model.lua
@@ -46,18 +46,22 @@ function mymodule.get_logfile(f)
config = config or format.parse_ini_file(fs.read_file(configfile) or "", "")
local files = {}
if config and config.log_path then
- files[#files+1] = {path = config.log_path}
+ files[#files+1] = {filename = config.log_path}
end
if config and config.info_log_path then
- files[#files+1] = {path = config.info_log_path}
+ files[#files+1] = {filename = config.info_log_path}
end
- if config and config.log_path then
- files[#files+1] = {path = config.debug_log_path}
+ if config and config.debug_log_path then
+ files[#files+1] = {filename = config.debug_log_path}
end
if 0 == #files then
- files[#files+1] = {path = "/var/log/messages", grep = "dovecot"}
+ if config and config.syslog_facility then
+ files[#files+1] = {facility = config.syslog_facility, grep = "dovecot"}
+ else
+ files[#files+1] = {facility = "mail", grep = "dovecot"}
+ end
end
- return cfe({ value=files, label="DoveCot Log Files" })
+ return cfe({ type="structure", value=files, label="DoveCot Log Files" })
end
return mymodule