Тест: проверка наследования настроек аппендеров вложенными логгерами + исправление кодировки#47
Тест: проверка наследования настроек аппендеров вложенными логгерами + исправление кодировки#47
Conversation
…точку) логгерам Co-authored-by: nixel2007 <[email protected]>
|
@copilot тест под виндой падает из-за кодировки. |
There was a problem hiding this comment.
Pull request overview
PR расширяет покрытие тестами иерархического наследования настроек логгеров: теперь проверяется, что вложенные (dot-notation) логгеры наследуют не только общий уровень, но и настройки отдельных аппендеров (включая их уровни).
Changes:
- Добавлен тест
Тест_ДолженПроверитьПередачуНастроекАппендеровВИерархииЛогов, который настраивает два file-аппендера на разных уровнях (DEBUG/ERROR) у родительского логгера и проверяет корректную фильтрацию сообщений у дочернего. - Тест добавлен в список выполняемых тестов.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: nixel2007 <[email protected]>
Исправлено в |
Existing hierarchy test (
Тест_ДолженПроверитьПриемственностьИерархииЛогов) only validates that a single appender is inherited by dot-notation child loggers. It doesn't verify that per-appender level settings propagate correctly.Тест_ДолженПроверитьПередачуНастроекАппендеровВИерархииЛогов— configuresparentlogwith two file appenders at different levels (DEBUG and ERROR), then createsparentlog.childlogand asserts:This confirms
НайтиНастройкуВышеПоИерахииpasses the full config (appender definitions + their individual levels) to child loggers, not just the log level.ЧтениеТекстаwithout explicit encoding defaults to the system codepage (Windows-1251), causing Cyrillic text comparison failures. Added explicit"UTF-8"parameter to allНовый ЧтениеТекста(...)calls in file-reading tests (Тест_ДолженПроверитьВыводДвухЛоговВОДинФайл,Тест_ДолженПроверитьПриемственностьИерархииЛогов, and the new test).🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.