Permalink
Browse files

allow to define port

  • Loading branch information...
1 parent 1070095 commit 29072a3b6802bcfac5d1a89ba64b858aa574c456 @burgalon burgalon committed Feb 27, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/gelfd
View
@@ -5,8 +5,9 @@ require 'gelfd'
require 'json'
server = UDPSocket.new
-puts "Starting up"
-server.bind(nil, 11211)
+port = ENV['PORT'] || 11211
+puts "Starting up port #{port}"
+server.bind(nil, port)
trap("INT") { puts "Shutting down"; exit }
loop do

0 comments on commit 29072a3

Please sign in to comment.