Module: Logsly
- Includes:
- MuchPlugin
- Defined in:
- lib/logsly/colors.rb,
lib/logsly.rb,
lib/logsly/outputs.rb,
lib/logsly/version.rb
Overview
Defined Under Namespace
Modules: InstanceMethods, Logging182, Outputs
Classes: Colors, ColorsData, NullColors, Settings
Constant Summary
collapse
- VERSION =
"1.3.1"
Class Method Summary
collapse
Class Method Details
.colors(name, &block) ⇒ Object
24
25
26
27
|
# File 'lib/logsly.rb', line 24
def self.colors(name, &block)
settings.colors[name.to_s] = Colors.new(name, &block) if !block.nil?
settings.colors[name.to_s]
end
|
.file(name, &block) ⇒ Object
33
34
35
|
# File 'lib/logsly.rb', line 33
def self.file(name, &block)
settings.outputs[name.to_s] = Outputs::File.new(&block)
end
|
.outputs(name) ⇒ Object
41
42
43
|
# File 'lib/logsly.rb', line 41
def self.outputs(name)
settings.outputs[name.to_s]
end
|
.settings ⇒ Object
20
21
22
|
# File 'lib/logsly.rb', line 20
def self.settings
@settings ||= Settings.new
end
|
.stdout(name, &block) ⇒ Object
29
30
31
|
# File 'lib/logsly.rb', line 29
def self.stdout(name, &block)
settings.outputs[name.to_s] = Outputs::Stdout.new(&block)
end
|
.syslog(name, &block) ⇒ Object
37
38
39
|
# File 'lib/logsly.rb', line 37
def self.syslog(name, &block)
settings.outputs[name.to_s] = Outputs::Syslog.new(&block)
end
|