Module: Logstop
- Defined in:
- lib/logstop.rb,
lib/logstop/railtie.rb,
lib/logstop/version.rb,
lib/logstop/formatter.rb
Defined Under Namespace
Classes: Formatter, Railtie
Constant Summary
collapse
- FILTERED_STR =
"[FILTERED]".freeze
- FILTERED_URL_STR =
"\\1[FILTERED]@".freeze
- CREDIT_CARD_REGEX =
/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}\b/
- EMAIL_REGEX =
/\b[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\b/i
- IP_REGEX =
/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/
- PHONE_REGEX =
/\b(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}\b/
- SSN_REGEX =
/\b\d{3}[\s-]\d{2}[\s-]\d{4}\b/
- URL_PASSWORD_REGEX =
/(\/\/\S+:)\S+@/
- VERSION =
"0.2.2"
Class Method Summary
collapse
Class Method Details
.guard(logger, **options) ⇒ Object
30
31
32
|
# File 'lib/logstop.rb', line 30
def self.guard(logger, **options)
logger.formatter = Logstop::Formatter.new(logger.formatter, **options)
end
|
.scrub(msg, ip: false) ⇒ Object