Skip to content

Commit 33a36fb

Browse files
authored
Merge pull request #16 from homiedopie/feature/INV-1535
Capture post data default to false
2 parents 176b304 + 31b18f3 commit 33a36fb

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ $logger = new Logger('application_name', 'environment_name', $transport, true);
6464

6565
### **Configuration Settings**
6666
- This allow users to override default settings of the logger (Masking Request Variables, Session, Cookie or Updating connection properties to different Transports etc.)
67+
- **Note** - By default capturing raw post data `(e.g. file_get_contents("php://input"))` and `$_POST` variables are `DISABLED` by default
68+
- To enable you can set the following options to `true`
69+
- `CapturePostVariables` - `Boolean` - Capture `$_POST` variables
70+
- `CaptureRawPostData` - `Boolean` - Capture `php://input` stream data `(e.g. file_get_contents("php://input"))`
71+
```php
72+
$config = array(
73+
'CapturePostVariables' => true,
74+
'CaptureRawPostData' => true,
75+
...
76+
);
77+
```
6778
- **Note** - For the `Whitelist/Blackist` setting. Anything `falsy` (`null`, `false`, `array()` etc. - Refer to php [empty](https://www.php.net/manual/en/function.empty.php) function checking) will be considered as `Do Not Track` - No variable data will be processed.
6879

6980
#### Logger Level

src/Stackify/Log/Transport/Config/AbstractConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public function __construct()
145145
$this->CaptureServerVariablesWhitelist = array('*');
146146
$this->CaptureServerVariablesBlacklist = null;
147147

148-
$this->CapturePostVariables = true;
148+
$this->CapturePostVariables = false;
149149
$this->CapturePostVariablesWhitelist = array('*');
150150
$this->CapturePostVariablesBlacklist = null;
151151

@@ -165,7 +165,7 @@ public function __construct()
165165
$this->CaptureErrorCookiesWhitelist = array('*');
166166
$this->CaptureErrorCookiesBlacklist = array('*');
167167

168-
$this->CaptureRawPostData = true;
168+
$this->CaptureRawPostData = false;
169169

170170
$ds = DIRECTORY_SEPARATOR;
171171
$this->DebugLogPath = realpath(dirname(__FILE__) . "$ds..$ds..") . $ds . 'debug/log.log';

0 commit comments

Comments
 (0)