You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For abnormal or unexpected events. Typically includes errors or conditions that don't cause the app to fail.
However, site requests are inherently user data, so it should be expected some would access paths of files that do not exist. Often potential paths are crawled automatically in search of exploits. Causing a Warning log for each of those does not make sense.
In fact, the original issue #102 that eventually caused PR #173 to implement this file not found log even mentions crawlers:
a reasonably high-traffic website that was frequently polled (by search engine crawlers, presumably) for static files from earlier versions of the site that no longer exist.
Warnings should not be used for these expected events. I suggest an Information log, like all the others in this file.
The text was updated successfully, but these errors were encountered:
Compare the WebOptimizer file not found log with the ASP.NET Core file not found log.
WebOptimizer logs it as Warning:
https://github.com/puhnastik/WebOptimizer/blob/a1cb720241120cb569abaa6d49475b87dde0f75a/src/WebOptimizer.Core/Extensions/LoggerExtensions.cs#L28-L31
Where ASP.NET Core's
UseStaticFiles
logs a file not found as a Debug log. Which makes more sense.https://github.com/dotnet/aspnetcore/blob/cd5ca6985645aa4929747bd690109a99a97126e3/src/Middleware/StaticFiles/src/LoggerExtensions.cs#L38-L39
Microsoft explains Warnings like this:
However, site requests are inherently user data, so it should be expected some would access paths of files that do not exist. Often potential paths are crawled automatically in search of exploits. Causing a Warning log for each of those does not make sense.
In fact, the original issue #102 that eventually caused PR #173 to implement this file not found log even mentions crawlers:
Warnings should not be used for these expected events. I suggest an Information log, like all the others in this file.
The text was updated successfully, but these errors were encountered: