echo "[{'account':'1812213231432969','password':'04a23f38'}, {account':'1812213685634','password':'123a'}]" >> /home/test-ilogtail/test-log/processor-desensitize.log
enable: true
inputs:
- Type: file_log
LogPath: /home/test-ilogtail/test-log/
FilePattern: processor-desensitize.log
processors:
- Type: processor_desensitize
SourceKey: content
Method: "const"
Match: "full"
ReplaceString: "********"
flushers:
- Type: flusher_stdout
OnlyStdout: true
{
"content":"********",
}
enable: true
inputs:
- Type: file_log
LogPath: /home/test-ilogtail/test-log/
FilePattern: processor-desensitize.log
processors:
- Type: processor_desensitize
SourceKey: content
Method: "const"
Match: "regex"
ReplaceString: "********"
RegexBegin: "'password':'"
RegexContent: "[^']*"
flushers:
- Type: flusher_stdout
OnlyStdout: true
{
"content":"[{'account':'1812213231432969','password':'********'}, {'account':'1812213685634','password':'********'}]",
}
enable: true
inputs:
- Type: file_log
LogPath: /home/test-ilogtail/test-log/
FilePattern: processor-desensitize.log
processors:
- Type: processor_desensitize
SourceKey: content
Method: "md5"
Match: "regex"
ReplaceString: "********"
RegexBegin: "'password':'"
RegexContent: "[^']*"
flushers:
- Type: flusher_stdout
OnlyStdout: true
{
"content":"[{'account':'1812213231432969','password':'9c525f463ba1c89d6badcd78b2b7bd79'}, {'account':'1812213685634','password':'1552c03e78d38d5005d4ce7b8018addf'}]",
}