We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby: 3.1.4 Rails: 7.0.7.2 rails_semantic_logger (4.12.0) semantic_logger (4.14.0)
Created a new application, added a Page model with title and desc fields, added the desc field to Rails.application.config.filter_parameters.
Page
title
desc
Rails.application.config.filter_parameters
The log without the gem:
Started POST "/pages" for ::1 at 2023-08-29 10:04:05 +0300 Processing by PagesController#create as TURBO_STREAM Parameters: {"authenticity_token"=>"[FILTERED]", "page"=>{"title"=>"1111", "desc"=>"[FILTERED]"}, "commit"=>"Create Page"} TRANSACTION (0.1ms) begin transaction ↳ app/controllers/pages_controller.rb:27:in `block in create' Page Create (1.1ms) INSERT INTO "pages" ("title", "desc", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "1111"], ["desc", "[FILTERED]"], ["created_at", "2023-08-29 07:04:05.536666"], ["updated_at", "2023-08-29 07:04:05.536666"]] ↳ app/controllers/pages_controller.rb:27:in `block in create' TRANSACTION (0.8ms) commit transaction ↳ app/controllers/pages_controller.rb:27:in `block in create' Redirected to http://localhost:3000/pages/1 Completed 302 Found in 8ms (ActiveRecord: 1.9ms | Allocations: 3939)
The log with the gem:
2023-08-29 10:07:39.767489 D [67049:puma srv tp 003] Rack -- Started -- { :method => "POST", :path => "/pages", :ip => "::1" } 2023-08-29 10:07:39.772787 D [67049:puma srv tp 003] PagesController -- Processing #create 2023-08-29 10:07:39.774923 D [67049:puma srv tp 003] (0.053ms) ActiveRecord -- TRANSACTION -- { :sql => "begin transaction", :allocations => 25, :cached => nil } 2023-08-29 10:07:39.776033 D [67049:puma srv tp 003] (0.774ms) ActiveRecord -- Page Create -- { :sql => "INSERT INTO \"pages\" (\"title\", \"desc\", \"created_at\", \"updated_at\") VALUES (?, ?, ?, ?)", :binds => { :title => "2222", :desc => "333", :created_at => "2023-08-29 07:07:39.774262", :updated_at => "2023-08-29 07:07:39.774262" }, :allocations => 42, :cached => nil } 2023-08-29 10:07:39.776974 D [67049:puma srv tp 003] (0.785ms) ActiveRecord -- TRANSACTION -- { :sql => "commit transaction", :allocations => 19, :cached => nil }
Field desc has not filtered
The text was updated successfully, but these errors were encountered:
When config.rails_semantic_logger.semantic = false
config.rails_semantic_logger.semantic = false
2023-08-29 11:41:38.342510 I [71939:puma srv tp 003] Rails -- Started POST "/pages" for ::1 at 2023-08-29 11:41:38 +0300 2023-08-29 11:41:38.348703 I [71939:puma srv tp 003] Rails -- Processing by PagesController#create as TURBO_STREAM 2023-08-29 11:41:38.348746 I [71939:puma srv tp 003] Rails -- Parameters: {"authenticity_token"=>"[FILTERED]", "page"=>{"title"=>"000", "desc"=>"[FILTERED]"}, "commit"=>"Create Page"} 2023-08-29 11:41:38.351155 D [71939:puma srv tp 003] ActiveRecord::Base -- TRANSACTION (0.1ms) begin transaction 2023-08-29 11:41:38.351668 D [71939:puma srv tp 003] ActiveRecord::Base -- ↳ app/controllers/pages_controller.rb:27:in `block in create' 2023-08-29 11:41:38.352524 D [71939:puma srv tp 003] ActiveRecord::Base -- Page Create (0.4ms) INSERT INTO "pages" ("title", "desc", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["title", "000"], ["desc", "[FILTERED]"], ["created_at", "2023-08-29 08:41:38.350462"], ["updated_at", "2023-08-29 08:41:38.350462"]] 2023-08-29 11:41:38.352905 D [71939:puma srv tp 003] ActiveRecord::Base -- ↳ app/controllers/pages_controller.rb:27:in `block in create' 2023-08-29 11:41:38.353809 D [71939:puma srv tp 003] ActiveRecord::Base -- TRANSACTION (0.7ms) commit transaction 2023-08-29 11:41:38.354123 D [71939:puma srv tp 003] ActiveRecord::Base -- ↳ app/controllers/pages_controller.rb:27:in `block in create' 2023-08-29 11:41:38.354612 I [71939:puma srv tp 003] Rails -- Redirected to http://localhost:3000/pages/6 2023-08-29 11:41:38.354650 I [71939:puma srv tp 003] Rails -- Completed 302 Found in 6ms (ActiveRecord: 1.2ms | Allocations: 3967)
["desc", "[FILTERED]"]
Sorry, something went wrong.
No branches or pull requests
Environment
Ruby: 3.1.4
Rails: 7.0.7.2
rails_semantic_logger (4.12.0)
semantic_logger (4.14.0)
Created a new application, added a
Page
model withtitle
anddesc
fields, added thedesc
field toRails.application.config.filter_parameters
.Expected Behavior
The log without the gem:
Actual Behavior
The log with the gem:
Summary
Field
desc
has not filteredThe text was updated successfully, but these errors were encountered: