Logging the right way!

asldevi (~asldevi)




All of us, the good developers, write logs in our code. Most of the times, logs are the only way for us to know what exactly has happened in our applications in a given period of time, which code paths were taken, which of them errored out. Some of us use the right logging levels diligently too. But, are we logging the right way?

  1. Can we find the logs that what we're looking for really quickly, when unexpected things happen?
  2. Are we able to slice and dice these logs based on the parameters/variables present in the logs?
  3. What about the same in micro-services world?

Yes (without hesitation) to these would be awesome and tell we're on right path. One may tend to think that the answers mostly depend upon the log management system they use(SaSS solutions like splunk or OSS solutions like ELK), but in reality, in vastly depends on "what kind of logs" we pump.

By the end of the talk, the audience would know what can be done to get a yes to all those questions, irrespective of the log management system they use (unless it is grep :P)

Talk Outline

  • Introduction and set context (5 mins)
    • Logging and log levels
  • Structured logging (10 mins)
    • what is it?
    • why is it beneficial?
    • how to do it Python
  • Async logging and Dynamic logging (7 mins)
    • how can I make logging NOT to contribute to my request latency?
    • how do I balance the debuggability and cost of log storage?
  • Logging in micro-services world? (3 mins)
  • Q & A (5 mins)


Some application development knowledge would be beneficial to connect with the content.

Speaker Info:

Devi has been a long time Pythonista and has delivered many talks at various conferences including PyCon India and RootConf. She has over a decade of experience in building software solutions in different domains in variety of tech stacks. Python is closer to her heart and finger tips, though.

She is currently working on improving observability along with developing cool products, at Razorpay.

Section: Developer tools and automation
Type: Talks
Target Audience: Beginner
Last Updated: