lib/pairing_matrix/server/server.rb in pairing_matrix-1.0.1 vs lib/pairing_matrix/server/server.rb in pairing_matrix-1.1
- old
+ new
@@ -7,9 +7,20 @@
module PairingMatrix
class Server < Sinatra::Base
set :bind, '0.0.0.0'
+ logging_file = File.new('app.log', 'a+')
+ logging_file.sync = true
+ before {
+ env["rack.errors"] = logging_file
+ }
+ configure do
+ enable :logging
+ logging_file.sync = true
+ use Rack::CommonLogger, logging_file
+ end
+
config_reader = PairingMatrix::ConfigReader.new('pairing_matrix.yml')
config = config_reader.config
commit_reader = PairingMatrix::CommitReader.new(config)
commit_reader = PairingMatrix::GithubCommitReader.new(config) if config.fetch_from_github?
\ No newline at end of file