|
| 1 | +--------------------- |
| 2 | +Web Framework Logging |
| 3 | +--------------------- |
| 4 | +Logging is a common mechanism for monitoring web applications written with a |
| 5 | +web framework. Runtime exceptions that prevent code from running are |
| 6 | +important to log to investigate and fix the source of the problems. |
| 7 | +Informational and debugging logging also helps to understand how the |
| 8 | +application is performing even if code is working as intended. |
| 9 | + |
| 10 | +Logging is often grouped into several categories: |
| 11 | + |
| 12 | +1. Information |
| 13 | +2. Debug |
| 14 | +3. Warning |
| 15 | +4. Error |
| 16 | + |
| 17 | +Logging errors that occur while a web framework is running is crucial to |
| 18 | +understanding how your application is performing. |
| 19 | +`Raven <http://raven.readthedocs.org/en/latest/>`_ is a Python client for the |
| 20 | +`Sentry <https://github.com/getsentry/sentry>`_ exception logging and |
| 21 | +aggregation application. Raven provides the way to send exceptions to |
| 22 | +Sentry, which should be deployed on a separate server from your production |
| 23 | +infrastructure. Raven can also be used by Python scripts to send other |
| 24 | +log data to Sentry for aggregation. Sentry provides a clean web application |
| 25 | +interface for viewing the exceptions. Sentry can also be configured with a |
| 26 | +mail plugin to send emails when exceptions occur. |
| 27 | + |
| 28 | + |
| 29 | +------------------- |
| 30 | +Logging Aggregators |
| 31 | +------------------- |
| 32 | +When you are running your application on several servers, it is helpful |
| 33 | +to have a monitoring tool called a "logging aggregator." You can configure your |
| 34 | +application to forward your application and system logs to one place that |
| 35 | +allows you to view, search, and monitor logging events across all of your machinces. |
| 36 | + |
| 37 | +Another advantage of log aggregators tools is they allow you to set up custom alerts |
| 38 | +and alarms so you can get notified when error rates breach a certain threshold |
| 39 | + |
| 40 | +Log Aggregator Third Party Services |
| 41 | +----------------------------------- |
| 42 | +`loggly <https://www.loggly.com/>`_ Loggly is a third party cloud based application that |
| 43 | +aggregates logs. They have instructions for every major language, including python. It includes email |
| 44 | +alerting on custom searches. |
| 45 | +`splunk <http://www.splunk.com/>`_ Splunk offers third party cloud and self hosted solutions |
| 46 | +for event aggregation. It excells at searching and data mining any text based data. |
| 47 | + |
| 48 | +Open Source Projects |
| 49 | +-------------------- |
| 50 | +`Logstash <http://logstash.net/>`_ |
| 51 | +`Graylog2 <http://graylog2.org/>`_ Provides a central server for log aggregation as well as a GUI for |
| 52 | +browsing and searching through log events. There are libraries for most major languages, including python. |
| 53 | +Saves data in elasicache. |
0 commit comments