switching logger to monolog
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
switching logger to monolog
Hi,
How do you configure logging so that it writes to file instead of db (madmin_log) ?
I've installed ai-monolog but I'm having some trouble with using that as the default logger (globally).
Info:
PHP 8.2
aimeos/ai-monolog 2023.10.2
aimeos/aimeos-laravel 2023.10.8
laravel/framework 10.48.11
How do you configure logging so that it writes to file instead of db (madmin_log) ?
I've installed ai-monolog but I'm having some trouble with using that as the default logger (globally).
Info:
PHP 8.2
aimeos/ai-monolog 2023.10.2
aimeos/aimeos-laravel 2023.10.8
laravel/framework 10.48.11
Re: switching logger to monolog
You need to overwrite the addLogger() method in the "aimeos.context" service:
- https://github.com/aimeos/aimeos-larave ... hp#L83-L85
- https://github.com/aimeos/aimeos-larave ... #L160-L165
There, you can add your Monolog logger instead like this:
https://github.com/aimeos/ai-monolog#setup
- https://github.com/aimeos/aimeos-larave ... hp#L83-L85
- https://github.com/aimeos/aimeos-larave ... #L160-L165
There, you can add your Monolog logger instead like this:
https://github.com/aimeos/ai-monolog#setup
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
