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('2018-12-14 04:57:13|error|some text with descriptions|192.168.0.1');


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('2018-12-14 04:57:13|error|some text with descriptions|192.168.0.1'); } 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('2018-12-14 04:57:13|init|some text with descriptions|192.168.0.1'); // some your code here $signalsCurl->add('2018-12-14 04:57:13|info|breakpoint information|10.34.52.67'); // some your code here again $signalsCurl->sendAll();