Class: Highlight::Logger
- Inherits:
-
Logger
- Object
- Logger
- Highlight::Logger
- Includes:
- ActiveSupport::LoggerSilence
- Defined in:
- lib/highlight.rb
Instance Method Summary collapse
- #add(severity, message = nil, progname = nil, &block) ⇒ Object
-
#initialize(*args) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(*args) ⇒ Logger
Returns a new instance of Logger.
232 233 234 235 |
# File 'lib/highlight.rb', line 232 def initialize(*args) super @local_level = nil end |
Instance Method Details
#add(severity, message = nil, progname = nil, &block) ⇒ Object
237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/highlight.rb', line 237 def add(severity, = nil, progname = nil, &block) severity ||= ::Logger::UNKNOWN return true if @logdev.nil? || severity < level progname ||= @progname = yield if .nil? && block_given? = progname if .nil? super H.instance&.record_log(nil, nil, severity, ) end |