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

Logger context #794

Merged
merged 15 commits into from
Jan 21, 2024
Merged

Logger context #794

merged 15 commits into from
Jan 21, 2024

Conversation

darkdef
Copy link
Contributor

@darkdef darkdef commented Jan 3, 2024

Q A
Is bugfix? ✔️
New feature? ✔️
Breaks BC?

Copy link

what-the-diff bot commented Jan 3, 2024

PR Summary

  • Enhanced Logging Functionality
    A new category has been added to the log context which will provide better clarity when analyzing logs.

  • Documentation Improved for Logger
    A new section in logger.md has been created to describe the advanced usage of Logger. This addition will help users better understand and utilize the Logger's advanced functionalities.

  • LogQuery Method Removal
    The logQuery method in AbstractPdoCommand.php has been removed, indicating a simplification in the way we handle queries.

  • Changes in Query Process
    The queryInternal method in AbstractPdoCommand.php has been updated. This suggests an improvement in our underlying query processes.

  • New Log Types
    Two new log types - 'connection' and 'transaction' - have been added to the AbstractPdoConnection.php. This will provide more details in the logs and simplify troubleshooting.

  • Transaction Logging
    The log type 'transaction' was also added to AbstractPdoTransaction.php, offering more visibility in transaction processes.

  • New LogTypes class
    A new LogTypes class has been created in the Pdo namespace which will help to maintain and manage different types of logs in a more structured way.

  • Test Method Updated
    The createQueryLogger method in CommonPdoCommandTest.php has been modified to include the log type 'query' in the parameters. This will aid in more thorough testing of query processes.

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (38c9090) 99.64% compared to head (1789d26) 99.64%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #794   +/-   ##
=========================================
  Coverage     99.64%   99.64%           
  Complexity     1271     1271           
=========================================
  Files            63       63           
  Lines          3080     3106   +26     
=========================================
+ Hits           3069     3095   +26     
  Misses           11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docs/en/connection/logger.md Outdated Show resolved Hide resolved
docs/en/connection/logger.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
darkdef and others added 3 commits January 4, 2024 13:46
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
@darkdef darkdef added this to the 2.0.0 milestone Jan 4, 2024
src/Driver/Pdo/LogTypes.php Outdated Show resolved Hide resolved
src/Driver/Pdo/LogTypes.php Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@vjik vjik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need revert AbstractPdoCommand::logQuery() and schedule it for a major release.

@darkdef darkdef modified the milestones: 2.0.0, 1.1.0 Jan 21, 2024
@darkdef darkdef merged commit ef81e8b into master Jan 21, 2024
164 of 169 checks passed
@darkdef darkdef deleted the logger-context branch January 21, 2024 15:54
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.

5 participants