waza-ari / monolog-mysql

MySQL Handler for Monolog, which allows to store log messages to a MySQL Table
MIT License
141 stars 85 forks source link

Include Level name #34

Closed TwinMist closed 1 year ago

TwinMist commented 4 years ago

Hi is it possible to include the level name and write this into the database automaticly? array(8) { ["DEBUG"]=> int(100) ["INFO"]=> int(200) ["NOTICE"]=> int(250) ["WARNING"]=> int(300) ["ERROR"]=> int(400) ["CRITICAL"]=> int(500) ["ALERT"]=> int(550) ["EMERGENCY"]=> int(600) } thanks

amacado commented 1 year ago

Hello @TwinMist I don't see the advantage of having the level as string. You can always compare and select to the levels as enums. Also numeric storage allows to sort rows with ease. Feel free to re-open the request with an explanation why you think having the strings in the database is an advantage over the current implementation.