Hi there.
We have next change record to Drupal core:
https://drupal.org/node/1918778
But Drupal\Core\Database\Log does not support this feature properly.
Drupal\Core\Database\Log::findCaller() method does not knows that database drivers can be located outside core.
For example I work to port Oracle Driver for D8 now, and I have next troubles:
1) Drupal\Core\Database\Log logs wrong data to database queries log.
2) every database driver that allocated not in core will fails on LoggingTest.
Proposed solution added in patch.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2151241_4.patch | 1.74 KB | chx |
drupal-fix_database_logger_works_with_not_core_drivers.patch | 893 bytes | InternetDevels | |
Comments
Comment #1
andypostNice catch, original issue was commited without tests so we need chx here
Comment #2
andypostComment #3
chx CreditAttribution: chx commentedLooks good to me. I still have no idea how on earth would we test any of this.
Comment #4
chx CreditAttribution: chx commentedIn fact, after alexpott prodded me a little, I do know how to test this. This now can be phpunit'd by just instantiating the Log class and then passing a made up stack to the findCaller method (it's a pure function). Please do not forget to add doxygen for the new $stack argument.
Comment #5
jibranAdded phpunit tag as per for #4. NR for testing the patch.
Comment #6
ParisLiakos CreditAttribution: ParisLiakos commentedComment #13
mondrakeFixed by
#2867788: Log::findCaller fails to report the correct caller function with non-core drivers.