-
Notifications
You must be signed in to change notification settings - Fork 3
TL-1007. add custome logger #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
trood/contrib/mylogger.py
Outdated
| elif action == 'delete': | ||
| return '3003' | ||
|
|
||
| def process(self, msg, kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не смотря на то, что мы ожидаем получить все поля, что то может пойти не так, тут могут вылезти KeyError, IndexError
Я бы предложил продумать как их обходить или как их обрабатывать
|
Логгер - переиспользуемый компонент, в нем не должно быть захардкожено номера ошибок и сообщений а только механизм валидации/форматирования. Основные задачи логера - Заставлять разработчика форматировать ошибки одинаковым образом. поэтому должен присутствовать какойто аспект валидации.. типа нельзя вызвать логер если не добавил описание ошибки в определенную структуру (например errors.py в приложении). а все |
4bce05e to
5f45774
Compare
apply new commits
022641c to
5622594
Compare
No description provided.