-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add a default Contao backend favicon to prevent log spamming #1785
Comments
Why not add a real favicon? What Contao version do you use? |
->
Also if a default icon comes with contao, the dev can't forget this. In this case: Contao 4.4 |
4.9 already provides that functionality. |
Ah ok. Then it's ok I guess since we're upgrading to 4.9 anyway. Thanks for the hint. |
Mhm, just tested that but at least in 4.9.2 there's no favicon.ico in the web root by default. In fact the request doesn't even come from the html but from chrome: But the result nevertheless is that tons of 404s are spammed to the logs if no favicon is added. Am I missing something? |
You can choose it in the website root so you can have different ones per domain. |
Got that, but my question concerned a default favicon.ico if the developer doesn't specify one. |
Considering the broken/ignorant caching strategy of favicons across most browsers, this probably isn't a good idea. |
Well, but currently the consequence is that we have thousands of 404s in the logs which is pollution. Each and every request to any site in backend produces this 404 for each and every user. In large pages this can get grow large after a while. I know, I can add the favicon, but it would be better to have that by default imho. |
Maybe we should not log failing requests for a non-existing favicon. Just like you would configure your web server, e.g. Nginx:
|
That would becan option, I think. |
I just updated a site from 4.8.7 to 4.9.4. with the maintenance mode on. Checking the updated website I saw that some preview pictures were not shown in the Isotope shop. Clicking on one of their placeholders I got the Contao error page. The log file says:
With the maintenance mode disabled there are no errors. I'm aware that these might be two different issues, but I don't know which might possibly be causing which. |
@Anke your issue is unrelated. And the error message you posted is unrelated to your issue. |
@Defcon0 I actually cannot reproduce the issue. Chrome shows a 404 response for the
|
Strange. I only get it in prod mode (contao 4.4.49):
I didn't change the logger config. Here's my project's config.yml:
|
@leofeyer this is for Contao 4.4, not 4.9. In Contao 4.4, 404 requests are logged. @Defcon0 please always provide the minimum amount of information required when posting a new ticket. |
That does not make sense, either, because in Contao 4.4, we do not have a dynamic route for |
Any request, that does refer to a physical location, is handled by Contao. And since the resource at |
This is not limited to |
I‘d prefer to add a yml option not to log 404s anymore. In most cases 404s from bots or MS exchange and so on are stored in the logs hiding the more relevant things like exceptions. The option should be to log them per default still for BC reasons. |
Which is already the case in Contao 4.9 anyway. However, the Monolog option |
can this issue be closed then? |
I think so, if it's the case in contao 4.9, that's enough for me, at least ;) Don't know if anyone disagrees? |
Hello,
we often have the problem that logs get "spammed" with 404s that result from a missing favicon.ico located in the web folder.
Would it be an option to add a default contao favicon file in order to prevent that (and to make clearer that you are working with contao ^^)? I personally prefer to have a different icons in backend and frontend.
Thanks!
Bye Defcon0
The text was updated successfully, but these errors were encountered: