You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-6Lines changed: 33 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,18 +66,27 @@ monolog:
66
66
67
67
#### Optional Configuration
68
68
69
-
<b>Proxy</b>
69
+
**Proxy**
70
70
- ExecTransport supports data delivery through proxy. Specify proxy using [libcurl format](http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html): <[protocol://][user:password@]proxyhost[:port]>
71
71
```php
72
72
$transport = new ExecTransport($apiKey, ['proxy' => 'https://55.88.22.11:3128']);
73
73
```
74
74
75
-
<b>Curl path</b>
75
+
**Curl path**
76
76
- It can be useful to specify ```curl``` destination path for ExecTransport. This option is set to 'curl' by default.
77
77
```php
78
78
$transport = new ExecTransport($apiKey, ['curlPath' => '/usr/bin/curl']);
79
79
```
80
80
81
+
**Log Server Environment Variables**
82
+
- Server environment variables can be added to error log message metadata. **Note:** This will log all
83
+
system environment variables; do not enable if sensitive information such as passwords or keys are stored this way.
84
+
85
+
```php
86
+
$handler = new StackifyHandler('application_name', 'environment_name', $transport, true);
87
+
```
88
+
89
+
81
90
### CurlTransport
82
91
83
92
CurlTransport does not require a Stackify agent to be installed and it also sends data directly to Stackify services. It collects log entries in a single batch and sends data using native [PHP cURL](http://php.net/manual/en/book.curl.php) functions. This way is a blocking one, so it should not be used on production environments. To configure CurlTransport you need to pass environment name and API key (license key):
@@ -111,12 +120,20 @@ monolog:
111
120
112
121
#### Optional Configuration
113
122
114
-
<b>Proxy</b>
123
+
**Proxy**
115
124
- CurlTransport supports data delivery through proxy. Specify proxy using [libcurl format](http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html): <[protocol://][user:password@]proxyhost[:port]>
116
125
```php
117
126
$transport = new CurlTransport($apiKey, ['proxy' => 'https://55.88.22.11:3128']);
118
127
```
119
128
129
+
**Log Server Environment Variables**
130
+
- Server environment variables can be added to error log message metadata. **Note:** This will log all
131
+
system environment variables; do not enable if sensitive information such as passwords or keys are stored this way.
132
+
133
+
```php
134
+
$handler = new StackifyHandler('application_name', 'environment_name', $transport, true);
135
+
```
136
+
120
137
### AgentTransport
121
138
122
139
AgentTransport does not require additional configuration in your PHP code because all data is passed to the [Stackify agent](https://stackify.screenstepslive.com/s/3095/m/7787/l/119709-installation-for-linux). The agent must be installed on the same machine. Local TCP socket on port 10515 is used, so performance of your application is affected minimally.
@@ -126,7 +143,7 @@ PHP:
126
143
use Monolog\Logger;
127
144
use Stackify\Log\Monolog\Handler as StackifyHandler;
128
145
129
-
$handler = new StackifyHandler('application_name');
146
+
$handler = new StackifyHandler('application_name', 'environment_name');
You will need to enable the TCP listener by checking the "PHP App Logs (Agent Log Collector)" in the server settings page in Stackify. See [Log Collectors Page](http://docs.stackify.com/m/7787/l/302705-log-collectors) for more details.
148
165
166
+
#### Optional Settings
167
+
168
+
**Log Server Environment Variables**
169
+
- Server environment variables can be added to error log message metadata. **Note:** This will log all
170
+
system environment variables; do not enable if sensitive information such as passwords or keys are stored this way.
171
+
172
+
```php
173
+
$handler = new StackifyHandler('application_name', 'environment_name', null, true);
174
+
```
175
+
149
176
## Notes
150
177
151
178
To get more error details pass Exception objects to the logger if available:
0 commit comments