Skip to content
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

Request: custom logger configuration to not log to the file system #863

Open
feibeck opened this issue Oct 10, 2024 · 3 comments
Open

Request: custom logger configuration to not log to the file system #863

feibeck opened this issue Oct 10, 2024 · 3 comments

Comments

@feibeck
Copy link

feibeck commented Oct 10, 2024

We're using Shopware with Mollie in a cluster (Kubernetes) environment with multiple running Shopware pods. The mollie logs are written to filesystem inside our Shopware containers and are lost after each new deployment. It would be nice to be able to configure the logger used by the Mollie plugin to write somewhere else or reuse the configured Shopware logger.

@BlackScorp
Copy link
Collaborator

BlackScorp commented Nov 4, 2024

hi @feibeck

we are using kernel.logs_dir as path. maybe there is a way to modify it within your shop?

https://github.com/mollie/Shopware6/blob/master/src/Resources/config/services/services.xml#L11

maybe you can decorate the factory to your needs?

@feibeck
Copy link
Author

feibeck commented Nov 4, 2024

Thanks for your answer!

Just changing the path does not help, we would need some other log handler than the hardcoded file handler. Decorating the factory is a possible solution which we already discussed and experimented with. It would be nice though if you would allow configuring the monolog instance the code uses. Maybe accept a mollie-log.yaml or something similar from the config directory and only set the file logger as a fallback?

@BlackScorp
Copy link
Collaborator

@feibeck i will see what i can do here. we have the problem that some things can be configured in plugin configuration therefore our logger needs db access which makes things a little complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants