nexus_semantic_logger 1.7.1 → 1.7.3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fb8608fc5db931115c7c1398607eff97e56745183939261b1993ea10004e10e
|
4
|
+
data.tar.gz: 9b326b54b65bcd45a0f5a8fef49e4d0b0112710028996afcb957ff0113aae8ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5d864a434d1499e2b0880b55f5969e2f0856e2625d9e20db54387b01610fea866cc09191276f2c2f5ff1601927f4a2a7140f42ca70993cf6f5c5499753c055e
|
7
|
+
data.tar.gz: 240f197160c496ac997ae2c5cd33a672d656b6bf6280318e7926d5cb593ecac40f794316a9090dfa7984273bff9ed987cf6ef689e20591a62690dd3b40b971c5
|
@@ -39,6 +39,11 @@ module NexusSemanticLogger
|
|
39
39
|
NexusSemanticLogger::DatadogTracer.new(service)
|
40
40
|
|
41
41
|
logger.info('SemanticLogger initialised.', level: config.log_level)
|
42
|
+
|
43
|
+
config.after_initialize do
|
44
|
+
require("nexus_semantic_logger/extensions/action_dispatch/debug_exceptions") if defined?(
|
45
|
+
::ActionDispatch::DebugExceptions)
|
46
|
+
end
|
42
47
|
end
|
43
48
|
|
44
49
|
def self.development(config)
|
@@ -42,12 +42,10 @@ module NexusSemanticLogger
|
|
42
42
|
rescue SystemStackError
|
43
43
|
as_json_serialise_errors = []
|
44
44
|
hash.keys.each do |key|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
as_json_serialise_errors << key
|
50
|
-
end
|
45
|
+
hash[key].as_json
|
46
|
+
rescue SystemStackError
|
47
|
+
hash.delete(key)
|
48
|
+
as_json_serialise_errors << key
|
51
49
|
end
|
52
50
|
hash[:as_json_serialise_errors] = as_json_serialise_errors
|
53
51
|
hash.to_json
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Log actual exceptions, not a string representation
|
3
|
+
require "action_dispatch"
|
4
|
+
|
5
|
+
module ActionDispatch
|
6
|
+
# Fork of the rails_semantic_logger DebugExceptions to fix its removal of the upstream 'log_rescued_responses' check.
|
7
|
+
# This allows applications to use the 'config.action_dispatch.log_rescued_responses' setting.
|
8
|
+
class DebugExceptions
|
9
|
+
private
|
10
|
+
|
11
|
+
undef_method :log_error
|
12
|
+
|
13
|
+
def log_error(request, wrapper)
|
14
|
+
return if !log_rescued_responses?(request) && wrapper.rescue_response?
|
15
|
+
|
16
|
+
ActiveSupport::Deprecation.silence do
|
17
|
+
ActionController::Base.logger.fatal(wrapper.exception)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
module NexusSemanticLogger
|
3
|
-
# Leave this as 1.7.
|
4
|
-
VERSION = '1.7.
|
3
|
+
# Leave this as 1.7.3 in order for CI process to replace with the tagged version.
|
4
|
+
VERSION = '1.7.3'
|
5
5
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexus_semantic_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johnathon Harris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- lib/nexus_semantic_logger/datadog_formatter.rb
|
112
112
|
- lib/nexus_semantic_logger/datadog_singleton.rb
|
113
113
|
- lib/nexus_semantic_logger/datadog_tracer.rb
|
114
|
+
- lib/nexus_semantic_logger/extensions/action_dispatch/debug_exceptions.rb
|
114
115
|
- lib/nexus_semantic_logger/sneakers_metrics.rb
|
115
116
|
- lib/nexus_semantic_logger/version.rb
|
116
117
|
- nexus_semantic_logger.gemspec
|