You can use a Logtail plug-in to mask the sensitive content in logs.
Entry point
If you want to use a Logtail plug-in to process logs, you can add a Logtail plug-in configuration when you create or modify a Logtail configuration. For more information, see Overview.
Configuration description
Parameter | Description |
Original Field | The original field that stores the log content before parsing. |
Data Masking Method | The method that is used to mask the sensitive content. Valid values:
|
Replacement String | If you set the Data Masking Method parameter to const, you must specify a string to replace the sensitive content. |
Content Expression that Precedes Replaced Content | The expression that is used to match the content preceding the sensitive content. The expression is used to find the sensitive content. You must use the RE2 syntax to specify the expression. For more information, see RE2 syntax. |
Content Expression to Match Replaced Content | The expression that is used to match the sensitive content. You must use the RE2 syntax to specify the expression. For more information, visit RE2 syntax. |
Replace All Matched Content |
|
Configuration example
Original field
content:[{'account':'1812213231432969','password':'04a23f38'}, {'account':'1812213685634','password':'123a'}]
Logtail plug-in configuration
Parsing result
[{'account':'1812213231432969','password':'********'}, {'account':'1812213685634','password':'********'}]