A PHP library for communicating with the Loggr API.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


PHP Loggr Agent

Loggr agent to post events. Includes a fluent interface to posting events.


  • Just copy the loggr.php file to your PHP application
  • Reference the file using 'require_once'

How To Use

Here's some sample code to get you started...

	require_once 'loggr.php';
	// creating class for using fluent syntax
	$loggr = new Loggr("myfirstlog", "db961642e48e48e4ab00ef60c90fa29e");
	// create a simple event
		->Text("Simple fluent event")
	// more complex event
	$world = "World";
		->TextF("hello%s", $world)
		->Tags("tag1 tag2 tag3")
		->Geo(-14.456, 73.6879)
	// trace a variable
	$var = "TEST VAR";
		->Text("Tracing TEST VAR")
	// trace an exception
	try {
		$error = 'Always throw this error';
		throw new Exception($error);
	} catch (Exception $e) {
	// alternatively you can use a non-fluent syntax
	$client = new LogClient("myfirstlog", "db961642e48e48e4ab00ef60c90fa29e");
	// create a simple event
	$ev = new Event();
	$ev->Text = "Simple non-fluent event";


More Information

For more information check out our docs site http://docs.loggr.net