lib/chain-reactor/controller.rb in chain-reactor-0.2.0 vs lib/chain-reactor/controller.rb in chain-reactor-0.2.1

- old
+ new

@@ -18,9 +18,14 @@ # Start the server, as a daemon or on top if --ontop is supplied as a CLI arg. # # Uses dante as the daemonizer. def start + if not @config.on_top? and RUBY_PLATFORM == 'java' + @log.warn { "fork() is not implemented in JRuby, chain-reactor will run on top instead of daemonizing" } + @config.on_top = true + end + # Change output format for logging to file if daemonizing unless @config.on_top? @log.outputters.first.formatter = ChainReactor::PatternFormatter.new(:pattern => "[%l] %d :: %m") @log.info { "Starting daemon, PID file => #{@config.pid_file}" } end