skates 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/skates.rb +4 -4
  2. metadata +3 -3
data/lib/skates.rb CHANGED
@@ -91,16 +91,16 @@ module Skates
91
91
  # In "development" environment, the log will be on stdout
92
92
  def self.reopen_logs
93
93
  # Open a new logger
94
- logger = Log4r::Logger.new("Skates")
94
+ logger = Log4r::Logger.new("")
95
95
  logger.add(Log4r::Outputter.stdout) if Skates.environment == "development"
96
96
  log_file = Log4r::RollingFileOutputter.new("#{Skates.environment}", :filename => "log/#{Skates.environment}.log", :trunc => false)
97
97
  case Skates.environment
98
98
  when "production"
99
- log_file.formatter = Log4r::PatternFormatter.new(:pattern => "%d (#{Process.pid}) [%l] :: %m", :date_pattern => "%d/%m %H:%M")
99
+ log_file.formatter = Log4r::PatternFormatter.new(:pattern => "%d (#{Process.pid}) [%l] :: %m #{Skates.router.nil? ? "" : (Skates.router.connection.nil? ? "" : "(" + Skates.router.connection.jid + ")") }", :date_pattern => "%d/%m %H:%M")
100
100
  when "development"
101
- log_file.formatter = Log4r::PatternFormatter.new(:pattern => "%d (#{Process.pid}) [%l] :: %m", :date_pattern => "%d/%m %H:%M")
101
+ log_file.formatter = Log4r::PatternFormatter.new(:pattern => "%d (#{Process.pid}) [%l] :: %m #{Skates.router.nil? ? "" : (Skates.router.connection.nil? ? "" : "(" + Skates.router.connection.jid + ")") }", :date_pattern => "%d/%m %H:%M")
102
102
  else
103
- log_file.formatter = Log4r::PatternFormatter.new(:pattern => "%d (#{Process.pid}) [%l] :: %m", :date_pattern => "%d/%m %H:%M")
103
+ log_file.formatter = Log4r::PatternFormatter.new(:pattern => "%d (#{Process.pid}) [%l] :: %m #{Skates.router.nil? ? "" : (Skates.router.connection.nil? ? "" : "(" + Skates.router.connection.jid + ")") }", :date_pattern => "%d/%m %H:%M")
104
104
  end
105
105
  logger.add(log_file)
106
106
  # Set up the variable.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - julien Genestoux
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-05 00:00:00 +02:00
17
+ date: 2010-04-11 00:00:00 +02:00
18
18
  default_executable: skates
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency