Class: NewRelic::Agent::MemoryLogger
- Inherits:
-
Object
- Object
- NewRelic::Agent::MemoryLogger
- Defined in:
- lib/new_relic/agent/agent_logger.rb
Overview
Base class for startup logging and testing in multiverse
Direct Known Subclasses
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
-
#messages ⇒ Object
Returns the value of attribute messages.
Instance Method Summary collapse
- #debug(*msgs) ⇒ Object
- #dump(logger) ⇒ Object
- #error(*msgs) ⇒ Object
- #fatal(*msgs) ⇒ Object
- #info(*msgs) ⇒ Object
-
#initialize ⇒ MemoryLogger
constructor
A new instance of MemoryLogger.
- #is_startup_logger? ⇒ Boolean
- #warn(*msgs) ⇒ Object
Constructor Details
#initialize ⇒ MemoryLogger
Returns a new instance of MemoryLogger.
148 149 150 |
# File 'lib/new_relic/agent/agent_logger.rb', line 148 def initialize @messages = [] end |
Instance Attribute Details
#level ⇒ Object
Returns the value of attribute level.
156 157 158 |
# File 'lib/new_relic/agent/agent_logger.rb', line 156 def level @level end |
#messages ⇒ Object
Returns the value of attribute messages.
156 157 158 |
# File 'lib/new_relic/agent/agent_logger.rb', line 156 def @messages end |
Instance Method Details
#debug(*msgs) ⇒ Object
174 175 176 |
# File 'lib/new_relic/agent/agent_logger.rb', line 174 def debug(*msgs) << [:debug, msgs] end |
#dump(logger) ⇒ Object
178 179 180 181 182 183 |
# File 'lib/new_relic/agent/agent_logger.rb', line 178 def dump(logger) .each do |msg| logger.send(msg[0], msg[1]) end .clear end |
#error(*msgs) ⇒ Object
162 163 164 |
# File 'lib/new_relic/agent/agent_logger.rb', line 162 def error(*msgs) << [:error, msgs] end |
#fatal(*msgs) ⇒ Object
158 159 160 |
# File 'lib/new_relic/agent/agent_logger.rb', line 158 def fatal(*msgs) << [:fatal, msgs] end |
#info(*msgs) ⇒ Object
170 171 172 |
# File 'lib/new_relic/agent/agent_logger.rb', line 170 def info(*msgs) << [:info, msgs] end |
#is_startup_logger? ⇒ Boolean
152 153 154 |
# File 'lib/new_relic/agent/agent_logger.rb', line 152 def is_startup_logger? true end |
#warn(*msgs) ⇒ Object
166 167 168 |
# File 'lib/new_relic/agent/agent_logger.rb', line 166 def warn(*msgs) << [:warn, msgs] end |