-
Notifications
You must be signed in to change notification settings - Fork 65
Log all searched locations for non existance resources #336
Comments
@hishamco are you saying that in 2.0.0 only the first log is written, but not the second log? |
BTW I think this might be happening because ASP.NET Core isn't the one doing the fallback - it's .NET Core / .NET Framework doing it, and we don't participate in the fallback logic it uses. |
Yep
It would be nice if we have the behavior that I mentioned on the first thread, which is similar to MVC fallback for views @Eilon my aim here is to write a very useful log, because the localization already fallback to the parent culture |
Yeah I don't think that ASP.NET Core has any control over that. The .NET fallback implementation will run without ASP.NET Core's knowledge - there's nowhere to inject the logging as far as I know. In particular, there's no way I know of to log things as they happen. You can log it before or after, but I don't think that's nearly as useful because in case there's an error, it won't be clear what triggered the error. |
The current implementation is already write a log when the resource is not found. just we need to write another log, because if the resource isn't found and |
@hishamco - I thought it's .NET itself that does the fallback of cultures, no? The only fallback that I can find that ASP.NET Core does is to determine which culture to select based on the incoming request's culture (e.g. headers, cookies, etc.). When it comes to doing the resource lookup, I can't find anything that does a meaningful fallback. |
This issue was moved to dotnet/aspnetcore#2646 |
After the PR #331, me as a developer I expect to log all searched locations for non-exist localization resources
Assume that I add the culture
ar
, with enabling parent culture fallback, so when the current culture isar-YE
I except the logger logs:instead of log the first message after fallback
/cc @ryanbrandenburg @pranavkm
The text was updated successfully, but these errors were encountered: