Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I need to override the memcache logger.
So the first step is to inject it.
Comment | File | Size | Author |
---|---|---|---|
#6 | logger-2779147-6.patch | 6.17 KB | martin107 |
#6 | interdiff-2779147-2-6.txt | 3.18 KB | martin107 |
#2 | deferWarning-2779147-2.patch | 7.34 KB | martin107 |
Comments
Comment #2
martin107 CreditAttribution: martin107 commentedtriggering testbot
Comment #3
damiankloip CreditAttribution: damiankloip at Tag1 Consulting commentedI'm not sure about this, we currently don't rely on watchdog() anymore, and you have injected the service before hand anyway. So the defer seems pointless now?
Comment #4
martin107 CreditAttribution: martin107 commentedThank you for the review....
My position is I am trying to evaluate the usefulness of this module My needs demand I pipe all logs to an independent logging service. - I am not an expert on D8 bootstrapping,
Do I interpret you concerns correctly ?
DrupalMemcacheInterface::get()
That is the point, in general, where our code may generate a log. Does directly injecting the logger service delay the creation of memcache services - breaking things?
If things are not broken then I would still like to simplify and in my next patch I want to just remove the concept of deferring?
Is that correct?
Comment #5
damiankloip CreditAttribution: damiankloip at Tag1 Consulting commentedYes. Correct. I think we can remove the defer logic and use the logger. Your patch already injects it into the backend. So an instance is already needed when the backend instance is created. So the original reason for registering a shutdown function in previous drupal versions seems less of a problem now in d8.
If we hit issues in the future we will have to remember think but I think that should be good.
Thank you!
Comment #6
martin107 CreditAttribution: martin107 commentedThat is good news -- I've stripped out the defer logic
Comment #7
damiankloip CreditAttribution: damiankloip at Tag1 Consulting commentedThis looks pretty good at a glance (looks like one newline missing but I can fix that on commit). I will commit this later on!
Comment #9
damiankloip CreditAttribution: damiankloip at Tag1 Consulting commentedFixed a couple of things and committed this.
Comment #10
sam.spinoy@gmail.com CreditAttribution: sam.spinoy@gmail.com at Adapt commentedThis commit deletes the .module file?
Comment #11
martin107 CreditAttribution: martin107 as a volunteer commentedYes is seemed appropriate.
The functionality in *.module file, the hook functions, have been moved out into various places, for example the info.yml files.
What remains in D8, in module files, is hook_help() functions, plus a few other things.
so we deleted the module file, once it was empty.
Comment #12
damiankloip CreditAttribution: damiankloip at Tag1 Consulting commentedYes, exactly. We have nothing in there now, and there is no requirement in D8 to have a .module file. If we need it in the future, it can come back.
Comment #13
bkosborneComment #15
wesleymusgrove CreditAttribution: wesleymusgrove commented@damiankloip, When I updated from 8.x-2.0-alpha2 to alpha4 I get this error when trying to run
drush cr
anddrush updb
:After updating the module and the .module file gets removed, how do I clear the cache so it no longer expects the module file to be there?