align README
This commit is contained in:
parent
dad34c0b61
commit
aa5b095b6e
13
README.md
13
README.md
@ -1,6 +1,15 @@
|
|||||||
# Sensitive Message Formatter
|
# Sensitive Message Formatter
|
||||||
|
|
||||||
A message formatter for Guzzles log middleware. It replaces static sensitive data (e.g. credentials).
|
A message formatter for Guzzles log middleware. It replaces static sensitive data (e.g. credentials) in the whole log item.
|
||||||
|
|
||||||
|
From:
|
||||||
|
```
|
||||||
|
[2024-12-24 18:00:00] Logger.INFO: POST https://api.google.com/account/login HTTP/1.1 username=myUsername&password=mySecretPassword RESPONSE: 200 - {"sessid":"fv0Krhl...
|
||||||
|
```
|
||||||
|
To:
|
||||||
|
```
|
||||||
|
[2024-12-24 18:00:00] Logger.INFO: POST https://api.google.com/account/login HTTP/1.1 username=**********&password=**************** RESPONSE: 200 - {"sessid":"fv0Krhl...
|
||||||
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -16,7 +25,7 @@ $stack->push(
|
|||||||
$myLogger,
|
$myLogger,
|
||||||
new sensitiveMessageFormatter(
|
new sensitiveMessageFormatter(
|
||||||
'{method} {uri} {req_body} - RESPONSE: {code} - {res_body}',
|
'{method} {uri} {req_body} - RESPONSE: {code} - {res_body}',
|
||||||
['myUser', 'myPassword']
|
['myUsername', 'mySecretPassword']
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
Logger::INFO
|
Logger::INFO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user