Module: EzLogsAgent::Logger
- Defined in:
- lib/ez_logs_agent/logger.rb
Overview
Minimal, defensive logging utility for the gem. Delegates to Rails.logger when available, falls back to STDERR. Never raises exceptions, never crashes the host application.
Constant Summary collapse
- LOG_LEVELS =
{ debug: 0, info: 1, warn: 2, error: 3 }.freeze
Class Method Summary collapse
Class Method Details
.debug(message) ⇒ Object
16 17 18 |
# File 'lib/ez_logs_agent/logger.rb', line 16 def debug() log(:debug, ) end |
.error(message) ⇒ Object
28 29 30 |
# File 'lib/ez_logs_agent/logger.rb', line 28 def error() log(:error, ) end |
.info(message) ⇒ Object
20 21 22 |
# File 'lib/ez_logs_agent/logger.rb', line 20 def info() log(:info, ) end |
.warn(message) ⇒ Object
24 25 26 |
# File 'lib/ez_logs_agent/logger.rb', line 24 def warn() log(:warn, ) end |