Log Redactor
Batch redact sensitive data from logs using configurable rules and multiple strategies
**Redaction Strategies:**
- **full** - Replace entire match with replacement string
- **mask** - Replace each character with mask character
- **keepFirstN** - Keep first N characters, mask rest (N specified in replacement)
- **keepLastN** - Keep last N characters, mask rest (N specified in replacement)
- **keepFirstLastN** - Keep first N and last N, mask middle (N specified in replacement)
- **hash** - Replace with SHA-256 hash of original value
- **partial** - Show format but replace content (e.g., j***@email.com)
**Custom Rules Format:**
```
# Format: field_name|pattern|strategy|replacement
email|[\w.-]+@[\w.-]+|mask|[EMAIL]
phone|\d{3}-\d{3}-\d{4}|keepLast4|***-***-XXXX
ssn|\d{3}-\d{2}-\d{4}|keepLast4|XXX-XX-XXXX
apiKey|Bearer [\w.-]+|replace|[REDACTED]
ip|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|mask|X.X.X.X
```
**Compliance Presets:**
- **GDPR** - Email, phone, IP, SSN, passport
- **HIPAA** - Email, phone, SSN, MRN, diagnosis
- **PCI DSS** - Card numbers, CVV, expiry, PIN
API Documentation
Request Endpoint
POST /en/api/tools/log-redactor
Request Parameters
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| logInput | textarea | Yes | - |
| presetRules | select | No | - |
| rules | textarea | No | - |
| caseSensitive | checkbox | No | - |
| dryRun | checkbox | No | - |
| generateReport | checkbox | No | - |
Response Format
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}
JSON Data:
JSON Data
AI MCP Documentation
Add this tool to your MCP server configuration:
{
"mcpServers": {
"elysiatools-log-redactor": {
"name": "log-redactor",
"description": "Batch redact sensitive data from logs using configurable rules and multiple strategies",
"baseUrl": "https://elysiatools.com/mcp/sse?toolId=log-redactor",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}
You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.
If you encounter any issues, please contact us at [email protected]