-
-
Notifications
You must be signed in to change notification settings - Fork 241
Add service for MongoDBFormatter #326
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
Conversation
The MongoDBFormatter has sensible values in the constructor so I guess it can be added as a service in this bundle
| <service id="monolog.formatter.json" class="Monolog\Formatter\JsonFormatter" public="false" /> | ||
| <service id="monolog.formatter.line" class="Monolog\Formatter\LineFormatter" public="false" /> | ||
| <service id="monolog.formatter.loggly" class="Monolog\Formatter\LogglyFormatter" public="false" /> | ||
| <service id="monolog.formatter.mongo_db" class="Monolog\Formatter\MongoDBFormatter" public="false" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <service id="monolog.formatter.mongo_db" class="Monolog\Formatter\MongoDBFormatter" public="false" /> | |
| <service id="monolog.formatter.mongodb" class="Monolog\Formatter\MongoDBFormatter" public="false" /> |
|
@GromNaN: Am I correct in assuming that defining a service here still requires it to be enabled via the I expect this eventually would warrant changes to https://github.com/symfony/symfony-docs/blob/7.3/logging/formatter.rst as well to list this in the documentation. |
|
Looking at Seldaek/monolog@c04d39d, the We can create a new monolog-bundle/src/DependencyInjection/MonologExtension.php Lines 668 to 678 in 43da9a3
|
|
@GromNaN: I've incorporated the assignment of a default MongoDBFormatter in #550 This only applies to handlers created with the new |
The MongoDBFormatter has sensible values in the constructor so I guess it can be added as a service in this bundle