rails_semantic_logger 4.6.1 → 4.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_semantic_logger/engine.rb +7 -1
- data/lib/rails_semantic_logger/extensions/action_cable/tagged_logger_proxy.rb +1 -1
- data/lib/rails_semantic_logger/extensions/action_controller/live.rb +2 -1
- data/lib/rails_semantic_logger/extensions/action_dispatch/debug_exceptions.rb +2 -1
- data/lib/rails_semantic_logger/extensions/action_view/streaming_template_renderer.rb +1 -1
- data/lib/rails_semantic_logger/extensions/active_job/logging.rb +1 -0
- data/lib/rails_semantic_logger/extensions/rails/server.rb +4 -2
- data/lib/rails_semantic_logger/options.rb +6 -1
- data/lib/rails_semantic_logger/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a51cc8580e730f4cf67e6525e4f560bf4b75d36f6876f89dc4381654ce58bfc
|
4
|
+
data.tar.gz: db93994bb8dde3d26e6e474f31fb1f80c225268037f8789f8a2ade91bb60f52c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 652228c641c795518f5030573d8eaf434f81a0bea1104e210c1da2bef83bc0e0cd2b6f26efd3d76cf1dbe04d10f4053a717883ddbe3b6d5bedf9619151bdb121
|
7
|
+
data.tar.gz: bd56572399d0c83ec385ab9e9db12b3b7f48428c54bd71b9c905595e5c619cebaff6e9e0df8792e719d69e4e6f3693a28fba8bb5606450c56e384cedea7abade
|
@@ -123,6 +123,9 @@ module RailsSemanticLogger
|
|
123
123
|
|
124
124
|
# Replace the Bugsnag logger
|
125
125
|
Bugsnag.configure { |config| config.logger = SemanticLogger[Bugsnag] } if defined?(Bugsnag)
|
126
|
+
|
127
|
+
# Set the IOStreams PGP logger
|
128
|
+
IOStreams::Pgp.logger = SemanticLogger["IOStreams::Pgp"] if defined?(IOStreams)
|
126
129
|
end
|
127
130
|
|
128
131
|
# After any initializers run, but after the gems have been loaded
|
@@ -218,7 +221,10 @@ module RailsSemanticLogger
|
|
218
221
|
console do |_app|
|
219
222
|
# Don't use a background thread for logging
|
220
223
|
SemanticLogger.sync!
|
221
|
-
|
224
|
+
# Add a stderr logger when running inside a Rails console unless one has already been added.
|
225
|
+
if config.rails_semantic_logger.console_logger && !SemanticLogger::Logger.processor.appenders.console_output?
|
226
|
+
SemanticLogger.add_appender(io: STDERR, formatter: :color)
|
227
|
+
end
|
222
228
|
|
223
229
|
# Include method names on log entries in the console
|
224
230
|
SemanticLogger.backtrace_level = SemanticLogger.default_level
|
@@ -1,9 +1,11 @@
|
|
1
1
|
# Patch the Rails::Server log_to_stdout so that it logs via SemanticLogger
|
2
|
-
|
2
|
+
require "rails"
|
3
|
+
|
3
4
|
module Rails
|
4
5
|
class Server
|
5
6
|
private
|
6
|
-
|
7
|
+
|
8
|
+
undef_method :log_to_stdout
|
7
9
|
def log_to_stdout
|
8
10
|
wrapped_app # touch the app so the logger is set up
|
9
11
|
|
@@ -48,6 +48,10 @@ module RailsSemanticLogger
|
|
48
48
|
#
|
49
49
|
# config.rails_semantic_logger.quiet_assets = false
|
50
50
|
#
|
51
|
+
# * Disable automatic logging to stderr when running a Rails console.
|
52
|
+
#
|
53
|
+
# config.rails_semantic_logger.console_logger = false
|
54
|
+
#
|
51
55
|
# * Override the output format for the primary Rails log file.
|
52
56
|
#
|
53
57
|
# Valid options:
|
@@ -98,7 +102,7 @@ module RailsSemanticLogger
|
|
98
102
|
# config.rails_semantic_logger.named_tags = nil
|
99
103
|
class Options
|
100
104
|
attr_accessor :semantic, :started, :processing, :rendered, :ap_options, :add_file_appender,
|
101
|
-
:quiet_assets, :format, :named_tags, :filter
|
105
|
+
:quiet_assets, :format, :named_tags, :filter, :console_logger
|
102
106
|
|
103
107
|
# Setup default values
|
104
108
|
def initialize
|
@@ -112,6 +116,7 @@ module RailsSemanticLogger
|
|
112
116
|
@format = :default
|
113
117
|
@named_tags = nil
|
114
118
|
@filter = nil
|
119
|
+
@console_logger = true
|
115
120
|
end
|
116
121
|
end
|
117
122
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_semantic_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.6.
|
4
|
+
version: 4.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
|
-
rubygems_version: 3.2.
|
104
|
+
rubygems_version: 3.2.32
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Feature rich logging framework that replaces the Rails logger.
|