Create a new input in Loggly that is HTTPS and json
Copy your input URL from the input page
Add Loggly to your allowed remote sites
Set the Remote Site URL to "https://logs.loggly.com"
After deploying the Custom Settings object and the Loggly class file, add a new Loggly custom setting
This can be done via the customize button if you installed the ApexExchange app
Then set the other custom parts to the logging
Single Log
Loggly.singleLog('Error Message', DateTime.now(), 'LEVEL');
Batching Logs
//Enable batching
Loggly.BATCH_LOGS=True;
//Create new instance of the Loggly class
Loggly l = new Loggly();
//Batch a message
l.add('Error Message', DateTime.now(), 'LEVEL');
//Any calls to Loggly.singleLog after setting BATCH_LOGS will automatically be
//batched and sent with the .flush
//Flush the message queue
l.flush();
Screenshot from Loggly