getLogs » Help

CURL library for the account type «Receiver»

Download our CURL library, put it onto your server and connect to your project

require_once 'path/to/library/signals_curl.class.php';

Create instance of class with your workspace UID and task UID (you can get these credentials inside the task in workspace)

$signalsCurl = new \Signals\CurlLibrary('YjdhNTYxM2M3NGZiYWRhMGY1NjBiOGI0OTQ5YWU4NTQ', 'b7a5613c74fbada0f560b8b4949ae854');

Send your log data from any method like

$result = $signalsCurl->send('2019-05-23 00:41:37|error|some text with descriptions|');

By default library returns boolean as a result of sending, but you can use / catch exceptions. For this, enable exceptions before sending data

$signalsCurl->exceptionsAllowed(); try { $result = $signalsCurl->send('2019-05-23 00:41:37|error|some text with descriptions|'); } catch (\Signals\CurlException $e) { // how you usually catch exceptions in your code }

Instead of immediately sending of log data, you can gather your data and send it in batches

$signalsCurl->add('2019-05-23 00:41:37|init|some text with descriptions|'); // some your code here $signalsCurl->add('2019-05-23 00:41:37|info|breakpoint information|'); // some your code here again $signalsCurl->sendAll();