Class: Instana::XLogger
- Inherits:
-
Logger
- Object
- Logger
- Instana::XLogger
- Defined in:
- lib/instana/logger.rb
Constant Summary collapse
- STAMP =
"Instana: ".freeze
Instance Method Summary collapse
- #debug(msg) ⇒ Object
- #error(msg) ⇒ Object
- #info(msg) ⇒ Object
-
#initialize(*args) ⇒ XLogger
constructor
A new instance of XLogger.
- #unkown(msg) ⇒ Object
- #warn(msg) ⇒ Object
Constructor Details
#initialize(*args) ⇒ XLogger
Returns a new instance of XLogger.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/instana/logger.rb', line 7 def initialize(*args) super(*args) if ENV.key?('INSTANA_GEM_TEST') self.level = Logger::DEBUG elsif ENV.key?('INSTANA_GEM_DEV') || ENV.key?('INSTANA_DEV') self.level = Logger::DEBUG elsif ENV.key?('INSTANA_QUIET') self.level = Logger::FATAL else self.level = Logger::WARN end end |
Instance Method Details
#debug(msg) ⇒ Object
32 33 34 |
# File 'lib/instana/logger.rb', line 32 def debug(msg) super(STAMP + msg) end |
#error(msg) ⇒ Object
20 21 22 |
# File 'lib/instana/logger.rb', line 20 def error(msg) super(STAMP + msg) end |
#info(msg) ⇒ Object
28 29 30 |
# File 'lib/instana/logger.rb', line 28 def info(msg) super(STAMP + msg) end |
#unkown(msg) ⇒ Object
36 37 38 |
# File 'lib/instana/logger.rb', line 36 def unkown(msg) super(STAMP + msg) end |
#warn(msg) ⇒ Object
24 25 26 |
# File 'lib/instana/logger.rb', line 24 def warn(msg) super(STAMP + msg) end |