lib/logsly/outputs.rb in logsly-1.2.0 vs lib/logsly/outputs.rb in logsly-1.3.0
- old
+ new
@@ -1,7 +1,7 @@
-require 'logging'
require 'syslog'
+require 'logsly/logging182'
module Logsly; end
module Logsly::Outputs
## NULL
@@ -26,11 +26,11 @@
self.colors_obj.run_build(*args)
self
end
def to_layout(data)
- Logging.layouts.pattern(data.to_pattern_opts)
+ Logsly::Logging182.layouts.pattern(data.to_pattern_opts)
end
def to_appender(*args)
raise NotImplementedError
end
@@ -79,22 +79,22 @@
class Stdout < Base
def to_appender(*args)
data = BaseData.new(*args, &self.build)
- Logging.appenders.stdout(:layout => self.to_layout(data))
+ Logsly::Logging182.appenders.stdout(:layout => self.to_layout(data))
end
end
## FILE
class File < Base
def to_appender(*args)
data = FileData.new(*args, &self.build)
- Logging.appenders.file(data.path, :layout => self.to_layout(data))
+ Logsly::Logging182.appenders.file(data.path, :layout => self.to_layout(data))
end
end
class FileData < BaseData
@@ -112,10 +112,10 @@
def to_appender(*args)
::Syslog.close if ::Syslog.opened?
data = SyslogData.new(*args, &self.build)
- Logging.appenders.syslog(data.identity, {
+ Logsly::Logging182.appenders.syslog(data.identity, {
:logopt => data.log_opts,
:facility => data.facility,
:layout => self.to_layout(data)
})
end