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

DbLoggerInterface #793

Closed
wants to merge 7 commits into from
Closed

DbLoggerInterface #793

wants to merge 7 commits into from

Conversation

darkdef
Copy link
Contributor

@darkdef darkdef commented Jan 2, 2024

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

db-mysql: yiisoft/db-mysql#315
db-pgsql: yiisoft/db-pgsql#327

Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (064e076) 99.64% compared to head (f9a4fd4) 99.64%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #793   +/-   ##
=========================================
  Coverage     99.64%   99.64%           
- Complexity     1265     1287   +22     
=========================================
  Files            63       69    +6     
  Lines          3063     3115   +52     
=========================================
+ Hits           3052     3104   +52     
  Misses           11       11           

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

Copy link

what-the-diff bot commented Jan 2, 2024

PR Summary

  • Modification in AbstractPdoCommand class
    The class now supports DbLoggerAwareInterface for enhanced logging methods, replacing the older methods like logQuery().
  • Changes to AbstractPdoConnection class
    This class too implements DbLoggerAwareInterface, and has several classes like ConnectionContext, LoggerContext, etc., added for better handling of database connections. Logging methods like logConnection(), beginTransaction(), etc., are also updated.
  • Update in AbstractPdoTransaction class
    Now supporting DbLoggerAwareInterface, with modified transaction methods that work with the updated logging mechanism.
  • New context-related classes added
    AbstractContext, ConnectionContext, QueryContext, and TransactionContext classes are added to aid in managing various database contexts.
  • New Logger-related classes introduced
    New classes related to DbLogger are added for more granular logging control.
  • Adjustments to CommonPdoCommandTest class
    The createQueryLogger() method now creates DbLogger instances instead of LoggerInterface instances.
  • New test file LoggerTest.php and respective class with test methods
    This file includes various test methods like testWithDefaultLevel, testWithOverrideLevel etc., to ensure the new logging mechanism's robustness. It also uses a helper method for creating LoggerInterface instances.

@darkdef darkdef mentioned this pull request Jan 2, 2024
12 tasks
@darkdef darkdef modified the milestone: 2.0.0 Jan 2, 2024
@darkdef darkdef marked this pull request as draft January 3, 2024 07:52
@darkdef darkdef closed this Jan 8, 2024
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.

1 participant