Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "alexanderpilhar"

Answer

Path in log4net.Production.config ist correct/working (<file value="App_Data/Logs/Logs.txt" />). But it doesn't matter as it is not what is being used (log4net.config is used instead).

Answer

The only thing I can see is the following:

~~In the Code above the file is named log4net.Production.config but actual file name is log4net.production.config (P vs p). Could this be the problem?~~ *

EDIT Hm, when published file name is log4net.Production.config again (with P).

EDIT * I was wrong about this: actual file name is log4net.Production.config, I confused it with appsettings.production.config ....

Answer

Hi @ismcagdas

Yes, it's the same code (left side: current project; right side: original ASPNETZERO 10.2.0)

Answer

In my production environment I just changed log4net.config from <file value="../../../App_Data/Logs/Logs.txt" /> to <file value="App_Data/Logs/Logs.txt" /> and recycled the application pool on IIS. Now logging is working as expected again.

I think production environment should use log4net.Production.config, right?

With ASPNETZERO 10.2.0 the path has been changed back and log files can be found in: <root>\src\CompanyName.ProjectName.Web.Host\App_Data\Logs

Oh, wow, I totally overlooked that ...

Thank you so much @ismcagdas!

Hi @ibtikar!

As @ismcagdas already stated you might consider using a raw sql query.

Hi @zony!

Yes, I'll stick with triggering my custom event manually, thank you!

Hi @ismcagdas and thank you for your answer!

I guess, if I want to have an event that's triggered before SaveChanges() is called, I have to trigger the event manually, right!?

I have had the same problem just now - I couldn't find current log files ...

For anyone wondering where to find them, the correct path is: <root>\src\CompanyName.ProjectName.Web.Host\bin\Debug\net5.0\App_Data\Logs

Showing 31 to 40 of 173 entries