Skip to content

Commit f6601b9

Browse files
committed
Update README.md
1 parent 036e132 commit f6601b9

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Install the latest version with `composer require stackify/logger`
1515

1616
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:
1717

18-
###ExecTransport
18+
#### ExecTransport
1919
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):
2020

2121
```php
@@ -26,7 +26,8 @@ $transport = new ExecTransport('api_key');
2626
$logger = new Logger('application_name', 'environment_name', $transport);
2727
```
2828

29-
####Configuration
29+
###### Optional Configuration
30+
3031
<b>Proxy</b>
3132
- 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]>
3233
```php
@@ -38,7 +39,8 @@ $logger = new Logger('application_name', 'environment_name', $transport);
3839
```php
3940
$transport = new ExecTransport($apiKey, ['curlPath' => '/usr/bin/curl']);
4041
```
41-
###CurlTransport
42+
43+
#### CurlTransport
4244
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):
4345
```php
4446
use Stackify\Log\Transport\CurlTransport;
@@ -48,23 +50,26 @@ $transport = new CurlTransport('api_key');
4850
$logger = new Logger('application_name', 'environment_name', $transport);
4951
```
5052

51-
####Configuration
53+
###### Optional Configuration
54+
5255
<b>Proxy</b>
5356
- 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]>
5457
```php
5558
$transport = new CurlTransport($apiKey, ['proxy' => 'https://55.88.22.11:3128']);
5659
```
57-
###AgentTransport
58-
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 is used, so performance of your application is affected minimally.
60+
#### AgentTransport
61+
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.
5963
```php
6064
use Stackify\Log\Standalone\Logger;
6165

6266
$logger = new Logger('appname.com');
6367
```
64-
####Configuration
68+
###### Optional Configuration
6569
- 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).
6670

6771
## Troubleshooting
72+
6873
If transport does not work, try looking into ```vendor\stackify\logger\src\Stackify\debug\log.log``` file (if it is available for writing). Errors are also written to global PHP [error_log](http://php.net/manual/en/errorfunc.configuration.php#ini.error-log).
6974
Note that ExecTransport does not produce any errors at all, but you can switch it to debug mode:
7075
```php

0 commit comments

Comments
 (0)