Module: Vigilant
- Defined in:
- lib/vigilant-ruby.rb,
lib/vigilant-ruby/logger.rb,
lib/vigilant-ruby/version.rb,
lib/vigilant-ruby/rails/logger.rb,
lib/vigilant-ruby/rails/railtie.rb
Overview
Vigilant is a logging library for the Vigilant platform.
Defined Under Namespace
Modules: Rails
Classes: Configuration, Error, Logger, StderrInterceptor, StdoutInterceptor
Constant Summary
collapse
- DEBUG =
'DEBUG'
- INFO =
'INFO'
- WARNING =
'WARNING'
- ERROR =
'ERROR'
- DEFAULT_BATCH_SIZE =
10
- DEFAULT_FLUSH_INTERVAL =
5
- VERSION =
'0.0.7'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
25
26
27
|
# File 'lib/vigilant-ruby.rb', line 25
def configuration
@configuration ||= Configuration.new
end
|
29
30
31
|
# File 'lib/vigilant-ruby.rb', line 29
def configure
yield(configuration) if block_given?
end
|
.logger ⇒ Object
33
34
35
36
37
38
39
40
41
|
# File 'lib/vigilant-ruby.rb', line 33
def logger
@logger ||= Vigilant::Logger.new(
name: configuration.name,
token: configuration.token,
endpoint: configuration.endpoint,
insecure: configuration.insecure,
passthrough: configuration.passthrough
)
end
|