Skip to content

Commit de132e2

Browse files
committed
Update README.md
1 parent ac86dd2 commit de132e2

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,32 @@ This additional meta data will then be automatically appended to all of your Lar
180180

181181

182182
### How to send data asynchronously
183-
By default each log event will be sent to Understand.io's api server directly after the event happens. If you generate a large number of logs, this could slow your app down and, in these scenarios, we recommend that you make use of a queue handler. To do this, change the config parameter `handler` to `queue` and Laravel queues will be automatically used. Bear in mind that by the default Laravel queue is `sync`, so you will still need to configure your queues properly using something like iron.io or Amazon SQS. See http://laravel.com/docs/queues for more information.
183+
184+
##### Async handler
185+
By default each log event will be sent to Understand.io's api server directly after the event happens. If you generate a large number of logs, this could slow your app down and, in these scenarios, we recommend that you make use of a async handler. To do this, change the config parameter `handler` to `async`.
184186

185187
```php
186188
/**
187-
* Specify which handler to use (sync|queue)
189+
* Specify which handler to use - sync, queue or async.
190+
*
191+
* Note that the async handler will only work in systems where
192+
* the CURL command line tool is installed
188193
*/
189-
'handler' => 'queue',
194+
'handler' => 'async',
195+
```
196+
197+
The async handler is supported in most of the systems - the only requirement is that CURL command line tool is installed and functioning correctly. To check whether CURL is available on your system, execute following command in your console:
198+
190199
```
200+
curl -h
201+
```
202+
203+
If you see instructions on how to use CURL then your system has the CURL binary installed and you can use the ```async``` handler.
204+
205+
> Keep in mind that Laravel allows you to specify different configuration values in different environments. You could, for example, use the async handler in production and the sync handler in development.
206+
207+
##### Laravel queue handler
208+
Although we generally recommend using the async handler, making use of queues is another another option. Bear in mind that by the default Laravel queue is `sync`, so you will still need to configure your queues properly using something like iron.io or Amazon SQS. See http://laravel.com/docs/queues for more information.
191209

192210
### Configuration
193211

@@ -205,9 +223,12 @@ return [
205223
'silent' => true,
206224

207225
/**
208-
* Specify which handler to use (sync|queue)
226+
* Specify which handler to use - sync, queue or async.
227+
*
228+
* Note that the async handler will only work in systems where
229+
* the CURL command line tool is installed
209230
*/
210-
'handler' => 'sync',
231+
'handler' => 'async',
211232

212233
'log_types' => [
213234
'eloquent_log' => [

0 commit comments

Comments
 (0)