Skip to content
Browse files

Initializing the logger in the constructor.

This now makes every method of the Launcher look very similar, and the constructor look particularly weird with that extra behavior.  This suggests that the Configuration may want to handle the proper creation of the servers with the correctly configured logger.
  • Loading branch information...
1 parent e46916e commit c726e570db5a0e6b9c982dd89b7de217b423dfd4 @danielwellman committed Nov 27, 2011
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/bane/launcher.rb
View
7 lib/bane/launcher.rb
@@ -4,14 +4,11 @@ class Launcher
def initialize(servers, logger = $stderr)
@servers = servers
- @logger = logger
+ @servers.each { |server| server.stdlog = logger }
end
def start
- @servers.each do |server|
- server.stdlog = @logger
- server.start
- end
+ @servers.each { |server| server.start }
end
def join

0 comments on commit c726e57

Please sign in to comment.
Something went wrong with that request. Please try again.