nsmcp::LogRedactor method message (public)
<instance of nsmcp::LogRedactor> message text
Defined in /usr/local/ns/tcl/nsmcp/lib/log-redaction.tcl
- Parameters:
- text (required)
- Testcases:
- No testcase defined.
Source code: set lines {} foreach line [split $text \n] { if {[regexp {^([ \t]*(?::[ \t]*)?)([^:\s]+)[ \t]*:[ \t]*(.*)$} $line -> prefix name value] && [:sensitive $name ${:headerNames}]} { set line "${prefix}${name}: ${:replacement}" } else {set line [:queryValues $line]} if {${:maskPeerAddresses}} { if {[regexp -indices {^(\S+)[ \t]+\S+[ \t]+\S+[ \t]+\[[0-9]{2}/[A-Za-z]{3}/[0-9]{4}:} $line match peer]} { lassign $peer a b set line [string replace $line $a $b ${:replacement}] } set line [:identifiers $line {(peer(?:address|addr)?[ \t]*[:=]?[ \t]+)([0-9A-Fa-f:.]+)(?:[ \t,;]|$)}] } if {${:maskUserIdentifiers}} { set line [:identifiers $line {(user_id[ \t]*[:=]?[ \t]+)([0-9]+)(?:[ \t,;]|$)}] # The third field in the recognized access header is the user. if {[regexp -indices {^\S+[ \t]+\S+[ \t]+(\S+)[ \t]+\[[0-9]{2}/[A-Za-z]{3}/[0-9]{4}:} $line match user]} { lassign $user a b if {[string range $line $a $b] ne "-"} { set line [string replace $line $a $b ${:replacement}] } } } lappend lines $line } return [join $lines \n]XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)