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
- ExecTransport and CurlTransport support data delivery through proxy. Specify proxy using [libcurl format](http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html): <[protocol://][user:password@]proxyhost[:port]>
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):
54
43
```php
55
44
use Stackify\Log\Transport\CurlTransport;
56
-
use Stackify\Log\Monolog\Handler as StackifyHandler;
45
+
use Stackify\Log\Standalone\Logger;
57
46
58
47
$transport = new CurlTransport('api_key');
59
48
$handler = new StackifyHandler('application_name', 'environment_name', $transport);
- ExecTransport and CurlTransport support data delivery through proxy. Specify proxy using [libcurl format](http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html): <[protocol://][user:password@]proxyhost[:port]>
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.
79
59
```php
80
60
use Stackify\Log\Standalone\Logger;
61
+
62
+
$logger = new Logger('appname.com');
63
+
$logger->warning('something happened');
64
+
try {
65
+
$db->connect();
66
+
catch (DbException $ex) {
67
+
$logger->error('DB is not available', ['ex' => $ex]);
68
+
}
81
69
```
82
70
####Configuration:
83
71
- 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