Class: Lumberjack::TagFormatter Deprecated

Inherits:
AttributeFormatter show all
Defined in:
lib/lumberjack/tag_formatter.rb

Overview

Deprecated.

Use AttributeFormatter instead.

TagFormatter has been renamed to AttributeFormatter as part of the transition from “tags” to “attributes” terminology in Lumberjack 2.0. This class exists solely for backward compatibility with the 1.x API and will be removed in a future version.

All functionality has been moved to AttributeFormatter with no changes to the API. Simply replace TagFormatter with AttributeFormatter in your code.

Examples:

Migration

# Old code (deprecated)
formatter = Lumberjack::TagFormatter.new

# New code
formatter = Lumberjack::AttributeFormatter.new

See Also:

Instance Method Summary collapse

Methods inherited from AttributeFormatter

#add, #add_attribute, #add_class, build, #clear, #default, #empty?, #format, #formatter_for_attribute, #formatter_for_class, #include, #include_attribute?, #include_class?, #prepend, #remove, #remove_attribute, #remove_class, #remove_default

Constructor Details

#initializeTagFormatter

Deprecated.

Use AttributeFormatter.new instead.

Create a new TagFormatter instance. Issues a deprecation warning and delegates to AttributeFormatter.



25
26
27
28
29
# File 'lib/lumberjack/tag_formatter.rb', line 25

def initialize
  Utils.deprecated("Lumberjack::TagFormatter", "Use Lumberjack::AttributeFormatter instead.") do
    super
  end
end