lib/logtail/logger.rb in logtail-ruby-0.1.2 vs lib/logtail/logger.rb in logtail-ruby-0.1.3
- old
+ new
@@ -133,19 +133,19 @@
#
# @example Logging to STDOUT
# logger = Logtail::Logger.new(STDOUT)
#
# @example Logging to the Logtail HTTP device
- # http_device = Logtail::LogDevices::HTTP.new("my-logtail-api-key")
+ # http_device = Logtail::LogDevices::HTTP.new("my-logtail-source-token")
# logger = Logtail::Logger.new(http_device)
#
# @example Logging to a file (with rotation)
# file_device = Logger::LogDevice.new("path/to/file.log")
# logger = Logtail::Logger.new(file_device)
#
# @example Logging to a file and the Logtail HTTP device (multiple log devices)
- # http_device = Logtail::LogDevices::HTTP.new("my-logtail-api-key")
+ # http_device = Logtail::LogDevices::HTTP.new("my-logtail-source-token")
# file_logger = ::Logger.new("path/to/file.log")
# logger = Logtail::Logger.new(http_device, file_logger)
def initialize(*io_devices_and_loggers)
if io_devices_and_loggers.size == 0
raise ArgumentError.new("At least one IO device or Logger must be provided when " +
@@ -184,9 +184,11 @@
after_initialize if respond_to?(:after_initialize)
Logtail::Config.instance.debug { "Logtail::Logger instantiated, level: #{level}, formatter: #{formatter.class}" }
@initialized = true
+
+ self.warn("The 'logtail-ruby' package has been deprecated. Please, switch to 'logtail' https://rubygems.org/gems/logtail")
end
# Sets a new formatted on the logger.
#
# @note The formatter cannot be changed if you are using the HTTP logger backend.