diff --git a/README.md b/README.md index 60919e1..3e302c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ # 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 @@ -16,7 +25,7 @@ $stack->push( $myLogger, new sensitiveMessageFormatter( '{method} {uri} {req_body} - RESPONSE: {code} - {res_body}', - ['myUser', 'myPassword'] + ['myUsername', 'mySecretPassword'] ) ), Logger::INFO