
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Concise request logging for Rails production
Logs a concise single line for each request at :warn
level. This allows
logging requests without all the extra logging that :info
level outputs.
Not suitable for development but ideal for production settings where each request and associated parameters is logged.
Inspired by a blog post on RubyJunky.com.
Special thanks to Zohreh Jabbari for doing the initial coding and proof of concept.
Add this line to your application's Gemfile:
gem 'concise_logging'
And then execute:
$ bundle
Or install it yourself as:
$ gem install concise_logging
Add this to your config/production.rb
. Configure tagging as per your desires.
We use tagging to indicate application with a 2 letter code and environment with
a single letter (e.g., p = production, s = staging).
# Configure logger to log warn and above
config.log_level = :warn
config.log_tags = ["cv-#{Rails.env[0]}"]
config.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(File.join(Rails.root, "log", "#{Rails.env}.log")))
If you want to try the logger in development than you have to manually add the
middleware and attach the log subscriber by adding these lines in your
config/development.rb
file. These lines are not needed for production.
Rails.application.middleware.use ConciseLogging::LogMiddleware
ConciseLogging::LogSubscriber.attach_to :action_controller
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that concise_logging demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.