Conversation
Because laminas-log and laminas-mail are both discontinued. And we do it now, because the migration to doctrine 3 exposed a cyclic dependency issue in Epicerio. The end result was we were trying to log something to DB before a connection to DB was established, and so we established a second connection to DB, wrecking havoc in our apps. So instead of deep diving in laminas-log to sort out all the details, I'd rather deep dive in monolog directly and clear the technical debt at the same time. And since monolog has an integration with symfony/mailer, it seemed natural to do that too, and clear even more technical debt. And to avoid the double-connection issue, the DB logger is only active, and only retrieves its dependencies, after we are certain that a connection to DB was established. The overall concept of our logs remains unchanged though. We have 3 log destinations: File, Mail and DB. Mail and DB have extra information through `RecordCompleter`. File does not.
The middleware is unconditionally enabled, so it can notify the DbHandler whenever we get an active connection. However, the middleware may or may not log SQL queries to files. This is controlled via the new config key `logSql`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.