lib/runit-man/service_info/base.rb in runit-man-2.4.12 vs lib/runit-man/service_info/base.rb in runit-man-2.4.14

- old
+ new

@@ -239,9 +239,19 @@ def log_command_args cmd = log_command return nil if cmd.nil? args = cmd.split(/\s+/).select { |arg| arg !~ /^\-/ } + # When 'slogd' specified anywhere in cmdline + # then extract svlogd directory if specified. + if args.detect { |arg| arg =~ /slogd/ } + while !args.empty? + # Directory should be specified immediately after 'svlogd' argument; + # otherwise nil + break if args.shift =~ /svlogd/ + end + return args + end return nil if args.shift !~ /#{Regexp.escape(logger_name)}/ args end