class TaggedLogging
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v3.2.22.5Wraps any standard Logger class to provide tagging capabilities. Examples:
Logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) Logger.tagged("BCX") { Logger.info "Stuff" } # Logs "[BCX] Stuff" Logger.tagged("BCX", "Jason") { Logger.info "Stuff" } # Logs "[BCX] [Jason] Stuff" Logger.tagged("BCX") { Logger.tagged("Jason") { Logger.info "Stuff" } } # Logs "[BCX] [Jason] Stuff"
This is used by the default Rails.logger as configured by Railties to make it easy to stamp log lines with subdomains, request ids, and anything else to aid debugging of multi-user production applications.
Inherits from
Methods (defined here)
- # add
- # clear_tags!
- # flush
- # method_missing
- # pop_tags
- # push_tags
- # respond_to?
- # respond_to_missing?
- # silence
- # tagged
- self. new
Private methods
(2)
Implementation detail — not part of the public API.
Methods (inherited)
From Object (18)
- # acts_like?
- # blank?
- # create_fixtures
- # duplicable?
- # html_safe?
- # in?
- # instance_variable_names
- # options
- # presence
- # present?
- # test_homepage
- # to_json
- # to_param
- # to_query
- # try
- # unescape
- # with_options
- self. table_name_prefix