Тёмный

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

The Tech Granth
Подписаться 20 тыс.
Просмотров 21 тыс.
50% 1

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

Наука

Опубликовано:

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 38   
@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
@ggsgetafaf1167
@ggsgetafaf1167 Год назад
Thank you for your contributing to the community. I have more than I hope from you
@yaswanthmareddy3930
@yaswanthmareddy3930 2 года назад
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 🙂
@aasthamehtatech
@aasthamehtatech 2 года назад
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 🙂
@uditagrawal6603
@uditagrawal6603 2 года назад
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 🙂
@sudharsansathiamoorthy1075
@sudharsansathiamoorthy1075 6 месяцев назад
Excellent explanation and easy to understand. Kudos to you Bro 👍👏
@ankitg200
@ankitg200 2 года назад
Best explanation of logger , and great usage of design pattern
@arpithams
@arpithams 2 года назад
great explanation. really liked the way the problem is approached.
@himanshusingh3056
@himanshusingh3056 2 года назад
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 🙂
@SuperWhatusername
@SuperWhatusername 2 года назад
Thank you so much 'The Tech Granth'
@pritybhudolia1012
@pritybhudolia1012 2 года назад
Really Helpful!
@prernagolani9014
@prernagolani9014 Год назад
very useful use case which covers Singelton, chain of responsibility and observer pattern
@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 2 года назад
Excellent
@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 ?
@manjuiyli2904
@manjuiyli2904 Месяц назад
I got same question in NI LLD interview
@bavmac
@bavmac 2 года назад
@thetechGranth Great video. Can you make system design video on tagging system,
@thelifehackerpro9943
@thelifehackerpro9943 3 месяца назад
but in actuall logger, you set the logging level first and based on that level specific data is displayed
@soumavanag5025
@soumavanag5025 2 года назад
Thank you :)
@TheTechGranth
@TheTechGranth 2 года назад
Hope it was helpful. Do like and subscribe and share with others 🙂
@prince26902690
@prince26902690 2 года назад
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
@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
@trishulcurtis1810 6 месяцев назад
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 года назад
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 < 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 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 28 дней назад
Yes, I also think the same why do we need a chain of responsibility here? does anyone get a solution?
Далее
Как пронести Конфеты В ТЮРЬМУ
19:16
Meninas na academia
00:11
Просмотров 1,7 млн
Why Use Design Patterns When Python Has Functions?
23:23
Amazon System Design Interview: Design Parking Garage
29:59
5 Design Patterns That Are ACTUALLY Used By Developers
9:27