Mute NotFoundHttpException from logs I'm getting a lot of noise in the logs from requests that are auto generated from browsers and spiders (like favico.ico, robots.txt, /home /news etc) that doesn't actually have any endpoints. 

These get caught by index.php and throws 

[yii\web\HttpException:404] yii\web\NotFoundHttpException: Template not found: new in /app/vendor/craftcms/cms/src/controllers/TemplatesController.php:93"


Which is causing a tremendous amount of noise. I would never consider a 404 a real error, so I would like to not log this at all in Craft (I can use access log aggregation for this). 

However, I'm not sure how to go about it. I have already created a custom log component, to remove the logging of all server variables on error, and send outputs to stderr (because of docker), with yii2-streamlog.

My log config is as follows:

    'components' =&gt; [
        'log' =&gt; function() {
            return Craft::createObject([
                'class' =&gt; yii\log\Dispatcher::class,
                'targets' =&gt; [
                    [
                        'class' =&gt; codemix\streamlog\Target::class,
                        'url' =&gt; 'php://stderr',
                        'levels' =&gt; Logger::LEVEL_ERROR | Logger::LEVEL_WARNING,
                        'logVars' =&gt; []
                    ],

                ]
            ]);
        }
    ],
Those should not be logged in web.log when running Craft 3.x, but rather in the web404s.log -- assuming you don't have devMode on (which it shouldn't be on for production...)

Vide: Zen and the Art of Craft CMS Log File Reading

Also should you really want to customize things, it's not hard to do with Craft CMS, check out: Creating a Custom Logger for Craft CMS