- log = Logger.new(file, 'weekly')
- log.formatter = proc { |_severity, datetime, _progname, msg|
- "[#{datetime}]: #{msg}\n"
- }
- log.info(report_all)
- file.close
Use file block, then no need to close.
good
Thanks, Yinsi
Thanks, Xueliang
+end
def monitor(query, actions, timeout) monitor = Monitor.new monitor.overrides = query -- 2.23.0