Module: Loba::Internal::Platform Private
- Defined in:
- lib/loba/internal/platform.rb,
lib/loba/internal/platform/formatter.rb,
lib/loba/internal/platform/within_rails.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Internal module for managing output and logging across Rails and non-Rails applications
Defined Under Namespace
Modules: WithinRails Classes: Formatter
Class Method Summary collapse
-
.writer(settings:) ⇒ lambda {|message| ...}
private
Provides mechanism for appropriate console output and logging.
Class Method Details
.writer(settings:) ⇒ lambda {|message| ...}
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
To avoid doubled output, if a non-Rails logger is to be logged to and logdev
is set to $stdout, then output will be suppressed (i.e., settings.out
is false
). Doubled output can still occur; in that case, explicitly use out: false.
Provides mechanism for appropriate console output and logging.
18 19 20 21 22 23 24 |
# File 'lib/loba/internal/platform.rb', line 18 def writer(settings:) lambda do || puts() if settings.out? settings.logger.debug { } if settings.log? end end |