SlideShare a Scribd company logo
Intro to Django debugging
& building Insights
Backend Engineer @Continual Engine
Board member @Django Software Foundation (DSF)
Open Source Contributor | Mentor 
AGENDA
Debugging Techniques
What is Logging ?
Print vs Logger
Deep dive into Logger
Configuring with Django
settings.py
Build a visualisation using
logger data
Conclusion
Let's Begin!
DEBUGGING
TECHNIQUES
Using output statements
Using Flags
Comments
Using Debugging Tools 
Identify -> Analyze -> Remove
LOGGER AND
LOGGING
Logging is basically tracking events once
a code/software runs. It is very essential
for debugging your software
Maintaining a log file helps is fixing
crashes faster
Logger is a built-in python module that
allows debugging and recording status
messages
Print statements works for
small scale 
With Print statements it's
difficult to control the log
information one want to
capture
Cannot map the severity level
with print statements
Cannot map the timestamp
with the message emitted    
PRINT VS LOGGER
Deep Dive into Logger (4 Pillars)
FILTER
Filters provide a fine grained facility
for determining which log, records to
output
LOGGER
A logger is the entry point into the
logging system.
A logger is configured to have a log
level
FORMATTER
Specifies layer/entities of record in
the output
HANDLER
Handler defines the destination of
the log record
For example - To a file, Console
MORE ABOUT LOGGER
LEVELS
DEBUG - Information used for debugging purposes 
INFO - General message
WARNING - Information used for Minor fault occurrence
ERROR - Information used for Major problem occurrence
CRITICAL - Information used for Critical issue occurrence
EXAMPLE USAGE
DEBUG - logger.debug() 
INFO - logger.info()
WARNING - logger.warning()
ERROR - logger.error()
CRITICAL - logger.critical()
USING LOGGER IN DJANGO
S T E P B Y S T E P
BASIC CONFIGURATION
(SETTINGS.PY)
integer-> representing the schema version
configures root/parent logger to log all the
messages in console level with level DEBUG
or higher
ADVANCE CONFIGURATION
App level -planets is the name of
the app
file path 
Defining formatter
formatter call
A P P L I C A T I O N
Presentations are
communication tools
that can be used as
demonstrations.
R E T E N T I O N
logging INFO (views.py)
Instance of a logger with
default __name__
creating a log
Intro to Django Debugging & Building Insights
DEVELOPING
INSIGHTS FROM
LOGGER FILE
GETTING OUR DATA READY
S T O R E D A T A
I N D E S I R E D
F O R M A T
tail -f
/tmp/debug.log
>out.txt
C O N V E R S I O N
To CSV/TSV etc
C H O O S E
T H E D A T A
P O I N T S
B U I L D ( ^ _ ^ )
I N S I G H T F U L
V I S U L I Z A T I O N
Intro to Django Debugging & Building Insights
BAR GRAPH - LOGGING LEVEL VS FREQUENCY
DIVING INTO CODE
THAT'S NOT ALL!
T H E R E A R E E N D L E S S P O S S I B I L I T I E S ^ @ , @ ^  
THANK YOU SO MUCH :)
@SAYABANIK

More Related Content

PDF
Rbootcamp Day 1
PPTX
7 compiler lab
PPT
Lec 04 intro assembly
PDF
Recursive descent parsing
PPTX
Advanced procedures in assembly language Full chapter ppt
PPTX
DOC
Chapter 5 notes
Rbootcamp Day 1
7 compiler lab
Lec 04 intro assembly
Recursive descent parsing
Advanced procedures in assembly language Full chapter ppt
Chapter 5 notes

Similar to Intro to Django Debugging & Building Insights (20)

PDF
stackconf 2020 | Let’s Debug Django like pro by Sayantika Banik
PDF
Introduction to logging in django
PPTX
Logging in Python.pptx
PDF
Logging in Python for large applications
PDF
20151024 Taichung.py 講一些 Python Logging
PPTX
Module 5 logging and its uses -----------------------
KEY
Monitoring and Debugging your Live Applications
PPTX
Python Programming Essentials - M27 - Logging module
PDF
Post-Mortem Debugging and Web Development
DOCX
Logging in Python.docx
PDF
PyConUK 2014 - PostMortem Debugging and Web Development Updated
PDF
Django best practices for logging and signals
ODT
Log4 C Developers Guide
PDF
Debugging (Django) application in PyCharm
PDF
Pycon SE 2022 LT - Python Logging Best Practises
PDF
Python vs JLizard.... a python logging experience
PDF
Intro to Python
PDF
Debugging Django
ODP
Turbo charge your logs
stackconf 2020 | Let’s Debug Django like pro by Sayantika Banik
Introduction to logging in django
Logging in Python.pptx
Logging in Python for large applications
20151024 Taichung.py 講一些 Python Logging
Module 5 logging and its uses -----------------------
Monitoring and Debugging your Live Applications
Python Programming Essentials - M27 - Logging module
Post-Mortem Debugging and Web Development
Logging in Python.docx
PyConUK 2014 - PostMortem Debugging and Web Development Updated
Django best practices for logging and signals
Log4 C Developers Guide
Debugging (Django) application in PyCharm
Pycon SE 2022 LT - Python Logging Best Practises
Python vs JLizard.... a python logging experience
Intro to Python
Debugging Django
Turbo charge your logs
Ad

More from CodeOps Technologies LLP (20)

PDF
AWS Serverless Event-driven Architecture - in lastminute.com meetup
PPTX
Understanding azure batch service
PDF
DEVOPS AND MACHINE LEARNING
PDF
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
PPT
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
PPTX
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
PPTX
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
PPTX
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
PPTX
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
PPTX
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
PPTX
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
PPTX
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
PDF
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
PDF
YAML Tips For Kubernetes by Neependra Khare
PDF
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
PPTX
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
PDF
Jet brains space intro presentation
PDF
Functional Programming in Java 8 - Lambdas and Streams
PPTX
Distributed Tracing: New DevOps Foundation
PDF
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
AWS Serverless Event-driven Architecture - in lastminute.com meetup
Understanding azure batch service
DEVOPS AND MACHINE LEARNING
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
YAML Tips For Kubernetes by Neependra Khare
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Jet brains space intro presentation
Functional Programming in Java 8 - Lambdas and Streams
Distributed Tracing: New DevOps Foundation
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
Ad

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
Autodesk AutoCAD Crack Free Download 2025
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Cost to Outsource Software Development in 2025
PDF
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Odoo Companies in India – Driving Business Transformation.pdf
Digital Systems & Binary Numbers (comprehensive )
iTop VPN Crack Latest Version Full Key 2025
Wondershare Filmora 15 Crack With Activation Key [2025
AutoCAD Professional Crack 2025 With License Key
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Design an Analysis of Algorithms I-SECS-1021-03
Designing Intelligence for the Shop Floor.pdf
Autodesk AutoCAD Crack Free Download 2025
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Complete Guide to Website Development in Malaysia for SMEs
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Weekly report ppt - harsh dattuprasad patel.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
Cost to Outsource Software Development in 2025
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free

Intro to Django Debugging & Building Insights

  • 1. Intro to Django debugging & building Insights Backend Engineer @Continual Engine Board member @Django Software Foundation (DSF) Open Source Contributor | Mentor 
  • 2. AGENDA Debugging Techniques What is Logging ? Print vs Logger Deep dive into Logger Configuring with Django settings.py Build a visualisation using logger data Conclusion
  • 4. DEBUGGING TECHNIQUES Using output statements Using Flags Comments Using Debugging Tools  Identify -> Analyze -> Remove
  • 5. LOGGER AND LOGGING Logging is basically tracking events once a code/software runs. It is very essential for debugging your software Maintaining a log file helps is fixing crashes faster Logger is a built-in python module that allows debugging and recording status messages
  • 6. Print statements works for small scale  With Print statements it's difficult to control the log information one want to capture Cannot map the severity level with print statements Cannot map the timestamp with the message emitted     PRINT VS LOGGER
  • 7. Deep Dive into Logger (4 Pillars) FILTER Filters provide a fine grained facility for determining which log, records to output LOGGER A logger is the entry point into the logging system. A logger is configured to have a log level FORMATTER Specifies layer/entities of record in the output HANDLER Handler defines the destination of the log record For example - To a file, Console
  • 8. MORE ABOUT LOGGER LEVELS DEBUG - Information used for debugging purposes  INFO - General message WARNING - Information used for Minor fault occurrence ERROR - Information used for Major problem occurrence CRITICAL - Information used for Critical issue occurrence
  • 9. EXAMPLE USAGE DEBUG - logger.debug()  INFO - logger.info() WARNING - logger.warning() ERROR - logger.error() CRITICAL - logger.critical()
  • 10. USING LOGGER IN DJANGO S T E P B Y S T E P
  • 11. BASIC CONFIGURATION (SETTINGS.PY) integer-> representing the schema version configures root/parent logger to log all the messages in console level with level DEBUG or higher
  • 12. ADVANCE CONFIGURATION App level -planets is the name of the app file path  Defining formatter formatter call
  • 13. A P P L I C A T I O N Presentations are communication tools that can be used as demonstrations. R E T E N T I O N logging INFO (views.py) Instance of a logger with default __name__ creating a log
  • 16. GETTING OUR DATA READY S T O R E D A T A I N D E S I R E D F O R M A T tail -f /tmp/debug.log >out.txt C O N V E R S I O N To CSV/TSV etc C H O O S E T H E D A T A P O I N T S B U I L D ( ^ _ ^ ) I N S I G H T F U L V I S U L I Z A T I O N
  • 18. BAR GRAPH - LOGGING LEVEL VS FREQUENCY
  • 20. THAT'S NOT ALL! T H E R E A R E E N D L E S S P O S S I B I L I T I E S ^ @ , @ ^  
  • 21. THANK YOU SO MUCH :) @SAYABANIK