
INFO - messages that carry important information, e.g.For example, 'Task has started', 'Task has ended in 5.4 seconds', 'Email for user id=55 was sent' DEBUG - messages that can help us track the flow of the algorithm, but are not important for anything else than troubleshooting.My usage of the logging levels is as follows: There are five levels that can be used for log messages. Log level helps us identify the severity of the message and makes it easier to navigate in the log output. getLogger ( _name_ ) Logging levelsĪnother part of the log structure is the log level. The variable _name_ will be translated into the name of the module that will also appear in the final log messages. In order to start logging, just add the following lines at the top of your file. It is also a good practice to use logging messages in the local environment to speed up the development, enabling these messages to stay there for production use.


Having reasonable logging messages in the production helped me discover several non-trivial bugs that would otherwise be undiscoverable. We will also briefly cover all preceding steps, such as the reasoning behind logging, configuring logging in Django and installing ELK stack.

The main aim of this article is to establish a connection between our Django server and ELK stack (Elasticsearch, Kibana, Logstash) using another tool provided by Elastic - Filebeat.
#Elk stack filebeats bro flow diagram how to#
In this tutorial, we are going to learn how to push application logs from our Django application to Elasticsearch storage and have the ability to display it in a readable way in Kibana web tool.
