Logging is a highly context sensitive with many different solutions, stacks, techs, services, etc. to fit an infinite number of use cases. This logging implementation is highly opinionated for specific situations. If this approach, resinates with your situation then copy or fork it.
This is not and will not be intended as a fully open community and will change at will, with no guarantee of breaking contracts.
A Symfony bundle for logging application events to a database using Monolog and Doctrine DBAL, with a web interface for viewing and searching logs.
composer require dragonwize/dw-log-bundleconfig/packages/dw_log.yamlbin/console dw:log:create-tableconfig/packages/monolog.yamlExample monolog config:
monolog:
handlers:
dbal:
type: service
id: Dragonwize\DwLog\Monolog\DbalHandler
level: debug
channels: ["!event", "!doctrine"]
Yes, storing in a SQL database is generally not performant for logs at scale. But if scale is not your concern and you want something free, easy, and with an opinionated DX then this works fine for those purposes. This code attempts to be performant only so far as it does not inflict on any other concerns.
This allows you to:
@todo
This is entirely up to you, if you are not comfortable securing the data stores and routes, then this may not be for you.
How can I help you explore Laravel packages today?