active_storage_silent_logs 0.1.1 → 0.1.2

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: 385f684a5006952f768e6a13c4c4ae16bf5d91d7746cb314c81933c64e42c3ff
4
- data.tar.gz: 73bf38fd7e80c3456316221496e8c0e5fa11bae9beeefdfb50865df1876d09bb
3
+ metadata.gz: 6b72d24745c4b77d629c96faab2ea07561a4049cdbca1caea4996baecd868178
4
+ data.tar.gz: 7b5f85a44469ac0936d754ad048133c9d76f180d90dd4760c4dc7cbf33b92d30
5
5
  SHA512:
6
- metadata.gz: cd9f975794edc04c7f3ac615e925f0ef49ac8181952bcf8c62b88e5821c58b47b7359cfd4630b64e317620613588541d952751da6ff6b3292abfdd660479c1ae
7
- data.tar.gz: 971064ac28ed630b25bf71840538e92b41357dd98867c5a3cdf82dd8907c587c881a7d07e43353026df7ab5f8ced75b8dab2559606080bb587335b6e5ef0fad8
6
+ metadata.gz: ea52e8fe29ddee4bde9ea406c3e2bb7253da3322c7a94a7ba84eb1f2be9715bf6818a727274ad2668856f5053360170391347d26e33afea5d073bddd64258b60
7
+ data.tar.gz: 4112970be78c1866e9421723a99211da3936119df7f61745de1a73133b8c186e6517dfdc7fae0dd6e783c7336a3d8ecb1bb584739d67d03bb7b3ddda5b28d2c1
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Active Storage silent logger
2
2
 
3
+ The idea of this gem is to hide as much as possible Active Storage logs from console so you can see only important information and requests. So ...
4
+
3
5
  Do you like logs like:
4
6
 
5
7
  ```log
@@ -8,17 +10,17 @@ Processing by ActiveStorage::DiskController#show as PNG
8
10
  Parameters: {"content_type"=>"image/png", "disposition"=>"inline; filename=\"image.png\"; filename*=UTF-8''image.png", "encoded_key"=>"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaDExUkhSelFuaHpNbVJyV1dsNFVsaGpaMXBTYVV0YWNGUUdPZ1pGVkE9PSIsImV4cCI6IjIwMTgtMDgtMjlUMTQ6MzA6MjAuMjE3WiIsInB1ciI6ImJsb2Jfa2V5In19--96a1e9bc562decfc1b9c22ebde2e57029ed5ea20", "filename"=>"image"}
9
11
  ```
10
12
 
11
- In console it looks like:
13
+ What we don't like in console it looks like:
12
14
 
13
15
  [![Sample](https://raw.githubusercontent.com/igorkasyanchuk/active_storage_silent_logs/master/docs/log.png)](https://raw.githubusercontent.com/igorkasyanchuk/active_storage_silent_logs/master/docs/log.png)
14
16
 
15
- I think no. It looks like a garbage.
17
+ So do you like it? I think no. It looks like a garbage.
16
18
 
17
19
  Imagine you have 1000 images to show! How long you need to scroll to see log of main request?
18
20
 
19
21
  So if you want this gem can hide such logs for you. Very useful for development.
20
22
 
21
- ** Since Rails logger is not thread-safe this gem doesn't fix all messages, since one thread could impact another. If you want to hide - run puma with only one thread (open `puma.rb` and put `threads_count = ENV.fetch("RAILS_MAX_THREADS") { 1 }`).**
23
+ **Since Rails logger is not thread-safe this gem doesn't fix all messages, since one thread could impact another. If you want to hide - run puma with only one thread (open `puma.rb` and put `threads_count = ENV.fetch("RAILS_MAX_THREADS") { 1 }`).**
22
24
 
23
25
  ## Usage
24
26
 
@@ -49,3 +51,6 @@ To play with gem open `test/dummy` and run `rake db:migrate` + `rails s -b 0.0.0
49
51
 
50
52
  ## License
51
53
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
54
+
55
+ [<img src="https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/more_gems.png?raw=true"
56
+ />](https://www.railsjazz.com/?utm_source=github&utm_medium=bottom&utm_campaign=active_storage_silent_logs)
@@ -3,7 +3,9 @@ module ActiveStorageSilentLogs
3
3
  initializer "active_storage_silent_logs" do
4
4
  Rails.application.config.middleware.insert_before Rack::Sendfile, ActiveStorageSilentLogs::SilentLogger
5
5
 
6
- ActiveStorage::BaseController.send :include, ActiveStorageSilentLogs::Controller
6
+ Rails.application.reloader.to_prepare do
7
+ ActiveStorage::BaseController.send :include, ActiveStorageSilentLogs::Controller
8
+ end
7
9
 
8
10
  Rails.application.config.filter_parameters += [:content_type, :disposition, :encoded_key, :signed_blob_id, :variation_key]
9
11
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveStorageSilentLogs
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_storage_silent_logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-29 00:00:00.000000000 Z
11
+ date: 2022-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -86,7 +86,7 @@ homepage: https://github.com/igorkasyanchuk/active_storage_silent_logs
86
86
  licenses:
87
87
  - MIT
88
88
  metadata: {}
89
- post_install_message:
89
+ post_install_message:
90
90
  rdoc_options: []
91
91
  require_paths:
92
92
  - lib
@@ -101,9 +101,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.7.6
106
- signing_key:
104
+ rubygems_version: 3.2.3
105
+ signing_key:
107
106
  specification_version: 4
108
107
  summary: Silent your Active Storage logs to avoid "noise" in logs.
109
108
  test_files: []