Class: Sapience::Subscriber
Direct Known Subclasses
Appender::Datadog, Appender::Sentry, Appender::Stream, Appender::Wrapper
Instance Attribute Summary collapse
-
#application ⇒ Object
Allow application name to be set globally or per subscriber.
-
#formatter ⇒ Object
Every logger has its own formatter.
-
#host ⇒ Object
Allow host name to be set globally or per subscriber.
Attributes inherited from Base
Instance Method Summary collapse
-
#close ⇒ Object
A subscriber should implement close if it can.
-
#default_formatter ⇒ Object
Returns [Sapience::Formatters::Default] formatter default for this subscriber.
-
#flush ⇒ Object
A subscriber should implement flush if it can.
-
#level ⇒ Object
Returns the current log level if set, otherwise it logs everything it receives.
Methods inherited from Base
#fast_tag, #level=, #measure, #payload, #pop_tags, #push_tags, #silence, #tagged, #tags, #with_payload
Instance Attribute Details
#application ⇒ Object
Allow application name to be set globally or per subscriber
31 32 33 |
# File 'lib/sapience/subscriber.rb', line 31 def application @application || Sapience.config.application end |
#formatter ⇒ Object
Every logger has its own formatter
7 8 9 |
# File 'lib/sapience/subscriber.rb', line 7 def formatter @formatter end |
Instance Method Details
#close ⇒ Object
A subscriber should implement close if it can.
21 22 23 |
# File 'lib/sapience/subscriber.rb', line 21 def close # NOOP end |
#default_formatter ⇒ Object
Returns [Sapience::Formatters::Default] formatter default for this subscriber
26 27 28 |
# File 'lib/sapience/subscriber.rb', line 26 def default_formatter Sapience::Formatters::Default.new end |
#flush ⇒ Object
A subscriber should implement flush if it can.
16 17 18 |
# File 'lib/sapience/subscriber.rb', line 16 def flush # NOOP end |
#level ⇒ Object
Returns the current log level if set, otherwise it logs everything it receives
11 12 13 |
# File 'lib/sapience/subscriber.rb', line 11 def level @level || :trace end |