I am using ASP.NET MVC and servicestack.logging I used log4net. I want to log current user wit below code:
private static readonly ILog Logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
Logger.Info(session.UserAuthId.ToString());
And in web.config
<appender type="log4net.Appender.RollingFileAppender" name="User_Log">
<file value="C:\logs" />
<datePattern value="dd.MM.yyyy'.log'" />
<appendToFile value="true" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10MB" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
</layout>
</appender>
But I see redundant logs in my text file:
How can I get rid of below message which are included inside my log.txt?
Registering Reply service 'WorkshopService' with request 'my web api name'
Registering OneWay service 'UploadService' with request 'my web api name'
Registering OneWay service 'PostmanService' with request 'Postman'
Initializing Application my application name Services took 1177.0709ms. No errors detected.
Any help? Thanks.