lib/angelo/base.rb in angelo-0.1.12 vs lib/angelo/base.rb in angelo-0.1.13
- old
+ new
@@ -9,10 +9,11 @@
@@addr = DEFAULT_ADDR
@@port = DEFAULT_PORT
@@ping_time = DEFAULT_PING_TIME
+ @@log_level = DEFAULT_LOG_LEVEL
if ARGV.any? and not Kernel.const_defined?('Minitest')
require 'optparse'
OptionParser.new { |op|
op.on('-p port', 'set the port (default is 4567)') { |val| @@port = Integer(val) }
@@ -106,9 +107,10 @@
def content_type type
Responder.content_type type
end
def run addr = @@addr, port = @@port
+ Celluloid.logger.level = @@log_level
@server = Angelo::Server.new self, addr, port
@server.async.ping_websockets
trap "INT" do
@server.terminate if @server and @server.alive?
exit