Skip to content

Rector the logger service#37

Open
zoglo wants to merge 3 commits intocontao:mainfrom
zoglo:feature/logger-service-rector
Open

Rector the logger service#37
zoglo wants to merge 3 commits intocontao:mainfrom
zoglo:feature/logger-service-rector

Conversation

@zoglo
Copy link
Copy Markdown
Member

@zoglo zoglo commented Mar 12, 2026

Description

Found a usage within an old extension where the logger service was called like the first line in the diff below:

- $logger = System::getContainer()->get('logger');
+ $logger = System::getContainer()->get('monolog.logger.contao');

@aschempp
Copy link
Copy Markdown
Member

Not sure that is correct? the monolog.logger.contao automatically adds a ContaoContext, but the regular service does not do that. And if I already wanted to log to the back end, I already had to add the ContaoContext?

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

Successfully merging this pull request may close these issues.

2 participants