Closed (fixed)
Project:
Redirect
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
16 Dec 2016 at 18:56 UTC
Updated:
24 Oct 2019 at 20:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
berdirDid some quick research, looks like the best way to do this is to add a decorator for the logger factory and return a null logger for the page not found channel.
Comment #3
jeetmail72Hi @Berdir,
Can you please explain the requirement that you are looking from this module.
Comment #4
tduong commentedComment #5
tduong commented- added the suppress_404 setting form in admin/config/search/redirect/settings
- implemented a decorator service with logger factory to avoid logging 404 events if the setting is enabled, otherwise let the default logger do its work
- added test coverage
Comment #7
tduong commentedFixed the failing test(s) caused by a recent commit in core (4h ago #2815845: Importing (deploying) REST resource config entities should automatically do the necessary route rebuilding).
Comment #8
berdirthis label can be improved: Whether to log page not found messages to the standard log or not
Suppress "page not found" log messages
Prevents page not found log messages, can be safely enabled when this module is used which stores them separately and nothing else relies on those messages.
that it can is not really an important information here. I'd write "Allows page not found log messages to be suppressed by returning a NullLogger".
Redirect404LogSuppressor?
use loggerChannelFactory and $logger_channel_factory.
error logging can happen very early, we don't know for sure that the config is readable and so on. It might also not be needed.
just assign this as $configFactory only read the config in case we have a page not found $channel request.
the the order then and read from $this->configFactory->get()...
this is weird, because there will then be two different instances, ourself with the parent and the inner.
Do not extend, only implement the interface. And call $this->loggerChannelFactory instead.
we can probably skip a good amount of those permission as we don't need the dblog UI.
no need to use LIKE
Comment #9
tduong commentedAddressed comment #8
Comment #11
berdirComment #13
berdirThat interdiff was pretty useless :)
Changes look good though, committed.
Comment #15
jenlamptonHi all, thanks for working on this much needed feature. Is there a matching Drupal 7 issue? I've got a handful of D7 sites I'd like to use this on.
Comment #16
jasonluttrellI would like to +1 or second the comment by jenlampton. I have some legacy D7 sites that have this issue, it would be great if someone can back port a fix like this or let us know if one is already available. Thanks!