Module: SafePgMigrations::Helpers::Logger
- Defined in:
- lib/safe-pg-migrations/helpers/logger.rb
Class Method Summary collapse
- .say(message, sub_item: false, sensitive: false, warn_sensitive_logs: true) ⇒ Object
- .say_method_call(method, *args, sensitive: false, warn_sensitive_logs: true, **options) ⇒ Object
Class Method Details
.say(message, sub_item: false, sensitive: false, warn_sensitive_logs: true) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/safe-pg-migrations/helpers/logger.rb', line 7 def say(, sub_item: false, sensitive: false, warn_sensitive_logs: true) return unless SafePgMigrations.current_migration if sensitive log_sensitive , sub_item: sub_item if warn_sensitive_logs && sensitive_logger? log 'Sensitive data sent to sensitive logger', sub_item: sub_item end else log , sub_item: sub_item end end |
.say_method_call(method, *args, sensitive: false, warn_sensitive_logs: true, **options) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/safe-pg-migrations/helpers/logger.rb', line 20 def say_method_call(method, *args, sensitive: false, warn_sensitive_logs: true, **) args += [] unless .empty? say "#{method}(#{args.map(&:inspect) * ', '})", sub_item: true, sensitive: sensitive, warn_sensitive_logs: warn_sensitive_logs end |