Make Your Logs Work for You
The days of logging in to servers and manually viewing log files are over. SolarWinds® Papertrail™ aggregates logs from applications, devices, and platforms to a central location.View Technology Info
Troubleshoot Fast and Enjoy It
SolarWinds® Papertrail™ provides cloud-based log management that seamlessly aggregates logs from applications, servers, network devices, services, platforms, and much more.View Capabilities Info
Aggregate and Search Any Log
SolarWinds® Papertrail™ provides lightning-fast search, live tail, flexible system groups, team-wide access, and integration with popular communications platforms like PagerDuty and Slack to help you quickly track down customer problems, debug app requests, or troubleshoot slow database queries.View Languages Info
Meet the Event Viewer
It's the heart of Papertrail.Start Tour
TAKE A TOUR
TBD - APM Integration Title
TBD - APM Integration DescriptionTBD Link
APM Integration Feature List
TBD - Built for Collaboration Title
TBD - Built for Collaboration DescriptionTBD Link
Built for Collaboration Feature List
Collect Logs: Apps & Services
Collect Logs: Hosting Services
Collect Logs: Integrations
Send Logs for Analytics
SolarWinds Users & Orgs
Support and Security
Papertrail can accept logs from any PHP app, including CakePHP, CodeIgniter, Laravel, Symfony, Zend, and “plain” PHP.
PHP apps can also send log messages directly to Papertrail. Here are a few ways to send syslog to Papertrail from PHP.
Here is simple PHP code to construct and transmit a UDP remote syslog log message.
As the code comments show, call that PHP function from your app (or from a log handler) to transmit the message to Papertrail.
Here is an example Monolog
SyslogUdpHandler that sends to Papertrail:
require 'vendor/autoload.php'; use Monolog\Logger; use Monolog\Formatter\LineFormatter; use Monolog\Handler\SyslogUdpHandler; // Set the format $output = "%channel%.%level_name%: %message%"; $formatter = new LineFormatter($output); // Setup the logger $logger = new Logger('my_logger'); $syslogHandler = new SyslogUdpHandler("logsN.papertrailapp.com", XXXXX); $syslogHandler->setFormatter($formatter); $logger->pushHandler($syslogHandler); // Use the new logger $logger->addInfo('Monolog test');
XXXXX to match your Papertrail log destination.
Rather than logging directly to syslog, send everything to stderr and Heroku will forward it over to Papertrail. An example of how do this using Monolog, adapted from this Heroku Dev Center article, is shown below.
require('vendor/autoload.php'); use Monolog\Logger; use Monolog\Formatter\LineFormatter; use Monolog\Handler\StreamHandler; // set the format $output = "%message%"; $formatter = new LineFormatter($output); // create a log channel to STDOUT $log = new Logger('my_logger'); $streamHandler = new StreamHandler('php://stdout', Logger::WARNING); $streamHandler->setFormatter($formatter); $log->pushHandler($streamHandler); // test messages $log->addWarning("testing 1"); $log->addWarning("testing 2");
The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.