mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 17:55:55 +02:00
parent
93ca3fbc85
commit
6e46c0a8e0
3 changed files with 16 additions and 3 deletions
13
lib/registry_log_formatter.rb
Normal file
13
lib/registry_log_formatter.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
class RegistryLogFormatter < ::Logger::Formatter
|
||||
def call(severity, timestamp, progname, msg)
|
||||
msg = filter_epp_legal_document(msg)
|
||||
"#{msg}\n"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def filter_epp_legal_document(msg)
|
||||
msg.gsub(/<eis:legalDocument([^>]+)>([^<])+<\/eis:legalDocument>/,
|
||||
"<eis:legalDocument>[FILTERED]</eis:legalDocument>")
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue