Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nexus_semantic_logger
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public
nexus_semantic_logger
Commits
90918b82
Commit
90918b82
authored
2 years ago
by
John Harris
Browse files
Options
Downloads
Patches
Plain Diff
fix: active support 'log_rescued_responses' override fixed
parent
8210dc41
No related branches found
Branches containing commit
Tags
1.5.1
Tags containing commit
Loading
Pipeline
#40348
failed
2 years ago
Stage: release
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/nexus_semantic_logger/application.rb
+4
-0
4 additions, 0 deletions
lib/nexus_semantic_logger/application.rb
lib/nexus_semantic_logger/extensions/action_dispatch/debug_exceptions.rb
+20
-0
20 additions, 0 deletions
...tic_logger/extensions/action_dispatch/debug_exceptions.rb
with
24 additions
and
0 deletions
lib/nexus_semantic_logger/application.rb
+
4
−
0
View file @
90918b82
...
...
@@ -39,6 +39,10 @@ module NexusSemanticLogger
NexusSemanticLogger
::
DatadogTracer
.
new
(
service
)
logger
.
info
(
'SemanticLogger initialised.'
,
level:
config
.
log_level
)
config
.
after_initialize
do
require
(
"nexus_semantic_logger/extensions/action_dispatch/debug_exceptions"
)
if
defined?
(
::
ActionDispatch
::
DebugExceptions
)
end
end
def
self
.
development
(
config
)
...
...
This diff is collapsed.
Click to expand it.
lib/nexus_semantic_logger/extensions/action_dispatch/debug_exceptions.rb
0 → 100644
+
20
−
0
View file @
90918b82
# Log actual exceptions, not a string representation
require
"action_dispatch"
module
ActionDispatch
# Fork of the rails_semantic_logger DebugExceptions to fix its removal of the upstream 'log_rescued_responses' check.
# This allows applications to use the 'config.action_dispatch.log_rescued_responses' setting.
class
DebugExceptions
private
undef_method
:log_error
def
log_error
(
request
,
wrapper
)
return
if
!
log_rescued_responses?
(
request
)
&&
wrapper
.
rescue_response?
ActiveSupport
::
Deprecation
.
silence
do
ActionController
::
Base
.
logger
.
fatal
(
wrapper
.
exception
)
end
end
end
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment