Module: Flydata::CommandLoggable
- Included in:
- Cli, Flydata::Command::Base, CompatibilityCheck, Output::ForwarderFactory, Output::RedshiftDDLRunner, Output::TcpForwarder
- Defined in:
- lib/flydata/command_loggable.rb
Instance Method Summary collapse
-
#before_logging(level, raw_msg, built_msg, log_params, options) ⇒ Object
hook.
- #log_error_stderr(message, log_params = {}, options = {}) ⇒ Object
- #log_info_stdout(message, log_params = {}, options = {}) ⇒ Object
- #log_warn_stderr(message, log_params = {}, options = {}) ⇒ Object
Instance Method Details
#before_logging(level, raw_msg, built_msg, log_params, options) ⇒ Object
hook
9 10 11 12 |
# File 'lib/flydata/command_loggable.rb', line 9 def before_logging(level, raw_msg, built_msg, log_params, ) $stdout.puts raw_msg if [:stdout] $stderr.puts raw_msg if [:stderr] end |
#log_error_stderr(message, log_params = {}, options = {}) ⇒ Object
22 23 24 |
# File 'lib/flydata/command_loggable.rb', line 22 def log_error_stderr(, log_params = {}, = {}) log_error(, log_params, {stderr: ![:quiet]}) end |
#log_info_stdout(message, log_params = {}, options = {}) ⇒ Object
14 15 16 |
# File 'lib/flydata/command_loggable.rb', line 14 def log_info_stdout(, log_params = {}, = {}) log_info(, log_params, {stdout: ![:quiet]}) end |
#log_warn_stderr(message, log_params = {}, options = {}) ⇒ Object
18 19 20 |
# File 'lib/flydata/command_loggable.rb', line 18 def log_warn_stderr(, log_params = {}, = {}) log_warn(, log_params, {stderr: ![:quiet]}) end |