Where is the log file in the .Net Core/Angular project? log4net.config points to App_Data/Logs/Logs.txt but I can find no such folder or file. When I intentionally throw an error on the server the following is returned to the client.
{
code: 0,
message: "An internal error occurred during your request!",
details: null,
validationErrors: null
}
My only option seems to be to write try-catch blocks but how do I find exceptions after deployment? I have tried setting the level to ALL in log4net.config but I am still only able to capture errors through try-catch and have no log file to refer to. Help would be most appreciated.
6 Answer(s)
-
0
Check your Web.Host project.
-
0
-
0
Use your File Explorer, not Visual Studio.
-
0
-
0
For anyone else who can't find the log file in a .Net Core/Angular project it is here: [attachment=0:fawg30kq]Capture.PNG[/attachment:fawg30kq] In the bin/debug/net461/App_data/Logs folder which is not part of the project so a solution-wide search will not find it. The current log file is locked when the solution is working so I'm not sure how you would go about retrieving current errors in a production environment?
-
0
The current log file is locked when the solution is working so I'm not sure how you would go about retrieving current errors in a production environment?
As mentioned, use your File Explorer.