Wraps 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.
Methods
- A
- C
- F
- M
- N
- S
- T
Class Public methods
new(logger)
Link
Instance Public methods
add(severity, message = nil, progname = nil, &block)
Link
flush()
Link
method_missing(method, *args)
Link
silence(temporary_level = ERROR, &block)
Link
tagged(*new_tags)
Link
Instance Protected methods