]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Read from STDIN when no log file is specified 5939/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Mar 2026 12:52:01 +0000 (15:52 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Mar 2026 12:52:01 +0000 (15:52 +0300)
lualib/lua_log_utils.lua

index 319031c56afc26af531811f722428f39f0c2e621..638e28f479210feb2766249795af8427c7b29c96 100644 (file)
@@ -307,7 +307,7 @@ function exports.process_logs(log_file, start_time, end_time, callback, opts)
   end_time = exports.normalized_time(end_time or '')
   if end_time == '' then end_time = nil end
 
-  if log_file == '-' or log_file == '' then
+  if not log_file or log_file == '-' or log_file == '' then
     exports.iterate_log(io.stdin, start_time, end_time, callback, opts)
   else
     local err, st = rspamd_util.stat(log_file)