logjam_agent 0.24.3 → 0.24.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/logjam_agent/railtie.rb +3 -3
- data/lib/logjam_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17b73d4d2cddddb7ad88a522a0b224fe5116510c
|
4
|
+
data.tar.gz: 8ab536c3bfcf28df31a8296bc66ffb9a3719615e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/logjam_agent/railtie.rb
CHANGED
@@ -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
|
-
|
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(
|
62
|
+
forwarding_error_logger = ::Logger.new(log_path)
|
63
63
|
rescue StandardError
|
64
64
|
forwarding_error_logger = ::Logger.new(STDERR)
|
65
65
|
end
|
data/lib/logjam_agent/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|