Logging From Applications
Loggly provides the infrastructure to aggregate and normalize log events so they are available to explore interactively, build visualizations, or create threshold-based alerting. In general, any method to send logs from a system or application to an external source can be adapted to send logs to Loggly. The following instructions provide one scenario for sending logs to Loggly.
You can send data to Loggly through Syslog for system and file based logs, or using our HTTP API for custom applications. Here are guides on the three general methods, as well as application specific guides with recommendations for each type of app and best practices.
General Methods
- Syslog Stream
Write the log to the local Syslog. And then set up Syslog to forward to Loggly. Once you’ve got your app forwarding logs to Syslog, check out our pages on Logging from Unix Systems or Logging from Windows Systems. - File Monitoring
Syslog can monitor or watch the log file & then forward the logs to Loggly. This requires adding just a few lines to your syslog configuration. This is not a great option if your log data is multi-line, e.g Java stack traces. Our Knowledge Base has articles on how to set up file monitoring for rsyslog, syslog-ng, and NXLog (Windows). - Send to our HTTP Endpoint
Write directly from the Application to Loggly using our HTTP Endpoint. This is the best method to use for client-side languages such as Javascript or pixel-tracking.
Application-Specific Guides
We have dozens of application specific guides including:
- System logs such as Linux and Windows
- Web servers such as Apache or Tomcat
- Programming libraries such as Java and Node
You can see more in the menu on the left.