Added logs for websocket server.

This commit is contained in:
Martin Edenhofer 2015-12-07 00:15:53 +01:00
parent a5f9d6106f
commit 4b1e6f05fd

View file

@ -81,6 +81,11 @@ if ARGV[0] == 'start' && @options[:d]
Daemons.daemonize
Dir.chdir dir
name = 'websocket-server'
$stdout.reopen( dir + '/log/' + name + '_out.log', 'w')
$stderr.reopen( dir + '/log/' + name + '_err.log', 'w')
# create pid file
daemon_pid = File.new( @options[:i].to_s, 'w' )
daemon_pid.sync = true