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
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Install the latest version with `composer require stackify/logger`
15
15
16
16
There are three different transport options that can be configured to send data to Stackify. Below will show how to implement the different transport options:
17
17
18
-
####ExecTransport
18
+
### ExecTransport
19
19
ExecTransport does not require a Stackify agent to be installed because it sends data directly to Stackify services. It collects log entries in a single batch, calls curl using the ```exec``` function, and sends it to the background immediately [```exec('curl ... &')```]. This will affect the performance of your application minimally, but it requires permissions to call ```exec``` inside the PHP script and it may cause silent data loss in the event of any network issues. This transport method does not work on Windows. To configure ExecTransport you need to pass the environment name and API key (license key):
20
20
21
21
```php
@@ -26,7 +26,7 @@ $transport = new ExecTransport('api_key');
26
26
$logger = new Logger('application_name', 'environment_name', $transport);
27
27
```
28
28
29
-
######Optional Configuration
29
+
#### Optional Configuration
30
30
31
31
<b>Proxy</b>
32
32
- 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]>
@@ -40,7 +40,7 @@ $logger = new Logger('application_name', 'environment_name', $transport);
40
40
$transport = new ExecTransport($apiKey, ['curlPath' => '/usr/bin/curl']);
41
41
```
42
42
43
-
####CurlTransport
43
+
### CurlTransport
44
44
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):
45
45
```php
46
46
use Stackify\Log\Transport\CurlTransport;
@@ -50,22 +50,22 @@ $transport = new CurlTransport('api_key');
50
50
$logger = new Logger('application_name', 'environment_name', $transport);
51
51
```
52
52
53
-
######Optional Configuration
53
+
#### Optional Configuration
54
54
55
55
<b>Proxy</b>
56
56
- 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]>
57
57
```php
58
58
$transport = new CurlTransport($apiKey, ['proxy' => 'https://55.88.22.11:3128']);
59
59
```
60
-
####AgentTransport
60
+
### AgentTransport
61
61
62
62
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.
63
63
```php
64
64
use Stackify\Log\Standalone\Logger;
65
65
66
66
$logger = new Logger('appname.com');
67
67
```
68
-
######Optional Configuration
68
+
#### Optional Configuration
69
69
- You will need to enable the TCP listener by checking a checkbox in "Server Settings" in Stackify for your server on the Servers Page. You can also change the default behavior for all your servers by going to the [Log Collectors Page](http://docs.stackify.com/m/7787/l/302705-log-collectors).
0 commit comments