System Design Logging Framework | Implementing Logger | System Design Interview Low Level| logging

Ғылым және технология

In this video I have implemented a logging framework. Loggers are very common asked low level system design question. There are multiple design patterns that can be used to create this framework. Here I have used 3 Object Oriented Design pattern and coupled them to work together.
Logging is a very common phenomenon in computer science and in any application.
complete code is added in my git repo.
You can buy us a coffee at : www.buymeacoffee.com/thetechg...
system design: • System Design | Distri...
DS for beginners: • Arrays Data Structures...
leetcode solutions: • Leetcode 84 | Largest ...
github: github.com/TheTechGranth/theg...
facebook group : / 741317603336313
twitter: / granthtech

Пікірлер: 38

  • @TheTechGranth
    @TheTechGranth2 жыл бұрын

    Complete code can be downloaded from : github.com/TheTechGranth/thegranths/tree/master/src/main/java/SystemDesign/LoggingFramework

  • @prince26902690

    @prince26902690

    2 жыл бұрын

    Don't you think this will print multiple levels if you log debug? we only need one logger

  • @ggsgetafaf1167
    @ggsgetafaf1167 Жыл бұрын

    Thank you for your contributing to the community. I have more than I hope from you

  • @aasthamehtatech
    @aasthamehtatech2 жыл бұрын

    Thanks for such an awesome video explaining mapping of design patterns applications with a relatable example!

  • @TheTechGranth

    @TheTechGranth

    2 жыл бұрын

    Glad it was helpful. Do like and subscribe and share with others 🙂

  • @SuperWhatusername
    @SuperWhatusername2 жыл бұрын

    Thank you so much 'The Tech Granth'

  • @himanshusingh3056
    @himanshusingh30562 жыл бұрын

    Quite informative ! Good way of thinking about related design patterns.

  • @TheTechGranth

    @TheTechGranth

    2 жыл бұрын

    Glad it was helpful. Do like and subscribe and share with others 🙂

  • @uditagrawal6603
    @uditagrawal66032 жыл бұрын

    This is quite informative with very nice demo on use of design patterns. Thanks!!! Nice job 👏

  • @TheTechGranth

    @TheTechGranth

    2 жыл бұрын

    Glad it was helpful. Do like and subscribe and share with others 🙂

  • @arpithams
    @arpithams2 жыл бұрын

    great explanation. really liked the way the problem is approached.

  • @ankitg200
    @ankitg2002 жыл бұрын

    Best explanation of logger , and great usage of design pattern

  • @yaswanthmareddy3930
    @yaswanthmareddy39302 жыл бұрын

    From past few days I am avidly following videos in your channel . This channel really comprehensive ,beginner friendly and not having any paid courses or ads like other big youtubers .... Simply #noShitTotallyHit. I hope you will continue this LLD series weekly

  • @TheTechGranth

    @TheTechGranth

    2 жыл бұрын

    Hope content was helpful. Do like the videos and subscribe and share with others 🙂

  • @sudharsansathiamoorthy1075
    @sudharsansathiamoorthy10755 ай бұрын

    Excellent explanation and easy to understand. Kudos to you Bro 👍👏

  • @pritybhudolia1012
    @pritybhudolia10122 жыл бұрын

    Really Helpful!

  • @prernagolani9014
    @prernagolani9014 Жыл бұрын

    very useful use case which covers Singelton, chain of responsibility and observer pattern

  • @rajdeepchauhan5251
    @rajdeepchauhan5251 Жыл бұрын

    Should we also consider to have a "String absolute_filename" when we are calling the fileObserver ? In which file will the data be logged ?

  • @user-hy9hw5cx6y
    @user-hy9hw5cx6y Жыл бұрын

    This was very detailed explanation of logging system, really helped, thanks

  • @TheTechGranth

    @TheTechGranth

    Жыл бұрын

    Do like, subscribe and share with others

  • @ramatripathi8315
    @ramatripathi8315 Жыл бұрын

    Excellent

  • @soumavanag5025
    @soumavanag50252 жыл бұрын

    Thank you :)

  • @TheTechGranth

    @TheTechGranth

    2 жыл бұрын

    Hope it was helpful. Do like and subscribe and share with others 🙂

  • @bavmac
    @bavmac2 жыл бұрын

    @thetechGranth Great video. Can you make system design video on tagging system,

  • @shubhamsrivastava1972
    @shubhamsrivastava19722 жыл бұрын

    Very good explanation :) But I don't think we need chain of responsibility design pattern here, we can use Factory pattern directly to get the object of the required Logger as we only need one logger at a time.

  • @prince26902690

    @prince26902690

    2 жыл бұрын

    I also agree. Not sure why we need chaining here? we only need to log one level at time

  • @bhawanasahu3000

    @bhawanasahu3000

    6 ай бұрын

    I answered the same in one of my interview, but interviewer restricted his expectations to chain of responsibility pattern & I never understood why.

  • @FusionArcs

    @FusionArcs

    6 ай бұрын

    @@bhawanasahu3000 let's take example of log4j, we can enable certain log level in the system like ERROR or INFO etc, this is how the error levels are defined ALL Now you can see that chain of responsibility comes in handy here, lets say I have used warn as log level in log 4j and in code i have different logs like debug, info, error etc lets take error, it will go to all handlers and check what log level is enabled e.g. it will first go to debug handler, is it enabled, no, then go to next info and next warn, okay warn is enabled but the log level to be printed is error, then it will move to next handler i.e. error okay now it matches the log level to be printed and also at the system level warn is enabled and error handler is eligible for printing this log There is a order of execution here where the request may or may not be fulfilled based on what log level is enabled and the order which the request should be served is defined by the chain of responsibility pattern i.e. ALL < DEBUG < INFO < WARN < ERROR < FATAL < OFF

  • @ankitpersie1

    @ankitpersie1

    2 ай бұрын

    Yes, absolutely.If the root level is ERROR, we expect it to display log.info() and log.error() statements only in actual logging framework.This can be easily handled by individual loggers by comparing their actual levels with root level.There is never a delegation needed.

  • @vaibhavghadge4057

    @vaibhavghadge4057

    20 күн бұрын

    Yes, I also think the same why do we need a chain of responsibility here? does anyone get a solution?

  • @thelifehackerpro9943
    @thelifehackerpro99432 ай бұрын

    but in actuall logger, you set the logging level first and based on that level specific data is displayed

  • @manjuiyli2904
    @manjuiyli2904Ай бұрын

    I got same question in NI LLD interview

  • @shuvramdutta8362
    @shuvramdutta8362 Жыл бұрын

    I think your logger class breaks " OPEN AND CLOSED PRINCIPLE" because if there are any other type of log files, then u have to create methods for them. If I wrong, then please correct me. Also we can use factory design pattern instead of chain responsibility pattern.

  • @trishulcurtis1810
    @trishulcurtis18106 ай бұрын

    bro you literally made a simple design more complex and mess

  • @ankitmaheshwari2341
    @ankitmaheshwari23412 жыл бұрын

    couple of issues with the design. We don't need chain of responsibility here. How to make log levels configurable so let us assume if we want to only print logs above INFO level.

  • @Paradise-kv7fn

    @Paradise-kv7fn

    2 жыл бұрын

    COR fits nicely here actually. For configuration part, we can maintain a threshold value that the user can configure and add a check for this before printing(perhaps the abstractlogger)

  • @prince26902690
    @prince269026902 жыл бұрын

    Very good explanation :) But I don't think we need chain of responsibility design pattern here, we can use Factory pattern directly to get the object of the required Logger as we only need one logger at a time

Келесі