kiwicom / structlog-sentry

Sentry integration for structlog
MIT License
108 stars 28 forks source link

Case sensitive support for custom log levels #117

Open paveldedik opened 1 year ago

paveldedik commented 1 year ago

To quote @radiophysicist

the problem is that logging doesn't prohibit to register custom log-level with name LeVeL and you try to look it for as LEVEL instead

i.e. we probably need update the method _get_level_value to account for custom log-levels with weird casings:

https://github.com/kiwicom/structlog-sentry/blob/db2b9bb8e0f36eb09c6c779a473aee23229e7118/structlog_sentry/__init__.py#L181-L193