logjam_agent 0.24.3 → 0.24.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e74ba9f0ea165f7aaac6b3829ca0cf88f4f82f8
4
- data.tar.gz: c99b71bd5e08f7f09e0257cb8cb0048333d34067
3
+ metadata.gz: 17b73d4d2cddddb7ad88a522a0b224fe5116510c
4
+ data.tar.gz: 8ab536c3bfcf28df31a8296bc66ffb9a3719615e
5
5
  SHA512:
6
- metadata.gz: 205690b2bec4aeb697703dab42c47aa1c1a19ea38be5743a90c56a1b399c67c4913b940a06ec8e03343cb55df4d86752165630f11c43155f9257588829b46050
7
- data.tar.gz: 1b66fa1f15db4053683abd857ef6da01c9815a86bd2898dc052658a2c5c88084050f5447d81db082bb47993a706814958a7ffa1a83fd9d9106b473c423feae7e
6
+ metadata.gz: b435147ba4565aa36cbe4562037d2064295e81e1a44fee5e7cee2abc31c11f4a92aef58863875aeb427271fa859023cc283f72f99bdf538d07c607aee498d186
7
+ data.tar.gz: 058ec490e616e80008abcd125e8c7f9be0af2a68092ce148da8657abdc3ae9d8a44c9706db564138007281a8d0253ecc1f75fa4ef06edcaee977dd58928de270
data/README.md CHANGED
@@ -118,6 +118,7 @@ fall back to the `to_json` method.
118
118
 
119
119
  If the agent experiences problems when sending data, it will log information to a file named
120
120
  `logjam_agent_error.log` which you can find under `Rails.root/log`.
121
+ If you set the `RAILS_LOG_TO_STDOUT` environment variable, those logs will be available through `stderr`.
121
122
 
122
123
  This behavior is customizable via a module level call back method:
123
124
 
@@ -16,7 +16,7 @@ module LogjamAgent
16
16
  initializer "initialize_logjam_agent_logger", :before => :initialize_logger do |app|
17
17
  Rails.logger ||= app.config.logger ||
18
18
  begin
19
- path = logjam_log_path(app)
19
+ path = ENV["RAILS_LOG_TO_STDOUT"].present? ? STDOUT : logjam_log_path(app)
20
20
  logger = LogjamAgent::BufferedLogger.new(path)
21
21
  logger.level = ::Logger.const_get(app.config.log_level.to_s.upcase)
22
22
  LogjamAgent.log_device_log_level = logger.level
@@ -57,9 +57,9 @@ module LogjamAgent
57
57
  end
58
58
 
59
59
  # install a default error handler for forwarding errors
60
- log_dir = File.dirname(logjam_log_path(app))
60
+ log_path = ENV["RAILS_LOG_TO_STDOUT"].present? ? STDERR : File.dirname(logjam_log_path(app)) + "/logjam_agent_error.log"
61
61
  begin
62
- forwarding_error_logger = ::Logger.new("#{log_dir}/logjam_agent_error.log")
62
+ forwarding_error_logger = ::Logger.new(log_path)
63
63
  rescue StandardError
64
64
  forwarding_error_logger = ::Logger.new(STDERR)
65
65
  end
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.24.3"
2
+ VERSION = "0.24.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.3
4
+ version: 0.24.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-08 00:00:00.000000000 Z
11
+ date: 2016-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake