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

Поділитися
Вставка
  • Опубліковано 13 жов 2024

КОМЕНТАРІ • 39

  • @TheTechGranth
    @TheTechGranth  2 роки тому

    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

  • @jackle5411
    @jackle5411 2 місяці тому

    Great explanation of logger design, and clear design pattern mapping. Thank you.

  • @yaswanthmareddy3930
    @yaswanthmareddy3930 2 роки тому +3

    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 роки тому +2

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

  • @ggsgetafaf1167
    @ggsgetafaf1167 Рік тому

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

  • @sudharsansathiamoorthy1075
    @sudharsansathiamoorthy1075 8 місяців тому +1

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

  • @himanshusingh3056
    @himanshusingh3056 2 роки тому +4

    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 🙂

  • @MAYANKGARG-t5n
    @MAYANKGARG-t5n Рік тому +1

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

  • @aasthamehtatech
    @aasthamehtatech 2 роки тому +1

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

    • @TheTechGranth
      @TheTechGranth  2 роки тому +1

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

  • @uditagrawal6603
    @uditagrawal6603 2 роки тому +1

    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 🙂

  • @prernagolani9014
    @prernagolani9014 Рік тому

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

  • @prince26902690
    @prince26902690 2 роки тому +3

    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

  • @arpithams
    @arpithams 2 роки тому

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

  • @ankitg200
    @ankitg200 2 роки тому

    Best explanation of logger , and great usage of design pattern

  • @SuperWhatusername
    @SuperWhatusername 2 роки тому

    Thank you so much 'The Tech Granth'

  • @rajdeepchauhan5251
    @rajdeepchauhan5251 2 роки тому

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

  • @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.

  • @thelifehackerpro9943
    @thelifehackerpro9943 5 місяців тому

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

  • @pritybhudolia1012
    @pritybhudolia1012 2 роки тому +1

    Really Helpful!

  • @bavmac
    @bavmac 2 роки тому

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

  • @ramatripathi8315
    @ramatripathi8315 2 роки тому

    Excellent

  • @soumavanag5025
    @soumavanag5025 2 роки тому +2

    Thank you :)

    • @TheTechGranth
      @TheTechGranth  2 роки тому

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

  • @manjuiyli2904
    @manjuiyli2904 3 місяці тому

    I got same question in NI LLD interview

  • @trishulcurtis1810
    @trishulcurtis1810 9 місяців тому

    bro you literally made a simple design more complex and mess

  • @ankitmaheshwari2341
    @ankitmaheshwari2341 2 роки тому

    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)

  • @shubhamsrivastava1972
    @shubhamsrivastava1972 2 роки тому +4

    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 роки тому +1

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

    • @bhawanasahu3000
      @bhawanasahu3000 9 місяців тому

      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 9 місяців тому

      @@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 < DEBUG < INFO < WARN < ERROR < FATAL < OFF e.g. if log level is set to warn, then only warn, error, fatal will be printed, rest all logs with other log levels will be disabled like debug, info etc will not be printed
      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 5 місяців тому

      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 3 місяці тому

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