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
- DEFAULT_LEVEL =
'info'.freeze
- VERSION =
"1.3.3"
Class Method Summary
collapse
Class Method Details
.colors(name, &block) ⇒ Object
27
28
29
30
|
# File 'lib/logsly.rb', line 27
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
36
37
38
|
# File 'lib/logsly.rb', line 36
def self.file(name, &block)
settings.outputs[name.to_s] = Outputs::File.new(&block)
end
|
.outputs(name) ⇒ Object
44
45
46
|
# File 'lib/logsly.rb', line 44
def self.outputs(name)
settings.outputs[name.to_s]
end
|
.settings ⇒ Object
23
24
25
|
# File 'lib/logsly.rb', line 23
def self.settings
@settings ||= Settings.new
end
|
.stdout(name, &block) ⇒ Object
32
33
34
|
# File 'lib/logsly.rb', line 32
def self.stdout(name, &block)
settings.outputs[name.to_s] = Outputs::Stdout.new(&block)
end
|
.syslog(name, &block) ⇒ Object
40
41
42
|
# File 'lib/logsly.rb', line 40
def self.syslog(name, &block)
settings.outputs[name.to_s] = Outputs::Syslog.new(&block)
end
|