Логирование в Python — всё, что надо знать и использовать
Мой курс «Хардкорная веб-разработка» — https://course.to.digitalБесплатная PDF-книга «Логирующий Python» — https://t.me/t0digital/1412
00:00:00 Что и почему будем изучать
00:03:08 Об авторе
00:04:05 Как всё это негодяйство работает?!
00:06:20 Логирование супротив дебаггера
00:09:35 Логирование супротив принтов
00:18:42 Logger и уровни логирования
00:27:41 Handler — куда выводим логи
00:34:32 Formatter — как форматировать логи
00:39:43 Скрываем секреты в логах
00:42:37 Структурированные JSON-логи
00:47:30 Передача динамических данных в логи
00:48:55 Почему не стоит использовать в логах f-string
00:52:05 Ленивое форматирование строк в логах
00:56:11 Готовим JSON-логи с кастомным полем
01:02:47 T-string в логировании
01:10:04 Промежуточный итог: logger, handler, formatter
01:15:27 Filter
01:17:47 Filter для обогащения логов динамическими данными
01:21:30 Пример: проставляем логам request_id в FastAPI
01:32:28 Итого
01:33:40 Мясо: иерархическая структура логгеров
01:51:36 На практике всё настраивается проще
01:53:37 Пример: настройка иерархических логгеров в FastAPI-проекте
02:00:46 Декларативная настройка логирования через dictConfig
02:04:28 Собираем логи FastAPI-приложения в VictoriaLogs
02:06:06 Как будем действовать
02:08:48 Запускаем VictoriaLogs
02:17:22 Смотрим, анализируем, ищем логи в VictoriaLogs
02:21:54 Что пишут в хороших логах и что пишут в плохих
02:27:54 Логирование исключений
02:30:53 LoggerAdapter
02:34:34 Вызов тяжелого кода в логах
02:36:22 Ротация файлов с логами
02:41:59 А почему logging PEP8 нарушает?
02:42:41 Надо ли бояться большого количества логгеров
02:44:20 Неблокирующее логирование в асинхронном коде
02:50:35 Раскрашиваем вывод логов в консоли
02:52:04 loguru и structlog
02:53:40 stacklevel и свои обёртки над логгерами
02:57:34 basicConfig
02:59:01 Логи vs мониторинг и оповещения
03:00:22 Так почему всё так работает в начальном примере?
03:03:47 Финал
Telegram канал — https://t.me/t0digital
ВК — https://vk.com/digitalize.team
RuTube — https://rutube.ru/channel/24802975/about/
Дзен — https://dzen.ru/id/6235d32cb64df01e6e78c883 Receive SMS online on sms24.me
TubeReader video aggregator is a website that collects and organizes online videos from the YouTube source. Video aggregation is done for different purposes, and TubeReader take different approaches to achieve their purpose.
Our try to collect videos of high quality or interest for visitors to view; the collection may be made by editors or may be based on community votes.
Another method is to base the collection on those videos most viewed, either at the aggregator site or at various popular video hosting sites.
TubeReader site exists to allow users to collect their own sets of videos, for personal use as well as for browsing and viewing by others; TubeReader can develop online communities around video sharing.
Our site allow users to create a personalized video playlist, for personal use as well as for browsing and viewing by others.
@YouTubeReaderBot allows you to subscribe to Youtube channels.
By using @YouTubeReaderBot Bot you agree with YouTube Terms of Service.
Use the @YouTubeReaderBot telegram bot to be the first to be notified when new videos are released on your favorite channels.
Look for new videos or channels and share them with your friends.
You can start using our bot from this video, subscribe now to Логирование в Python — всё, что надо знать и использовать
What is YouTube?
YouTube is a free video sharing website that makes it easy to watch online videos. You can even create and upload your own videos to share with others. Originally created in 2005, YouTube is now one of the most popular sites on the Web, with visitors watching around 6 billion hours of video every month.