Log4NetCore Log4NetCore is a .NET Core library to easily integrate log4net in .NET Core applications Nuget https://www.nuget.org/packages/Log4NetCoreEx/ Github https://github.com/rizansari/Log4NetCore Installation Install-Package Log4NetCoreEx Using the library Logging Builder How to use using Logging Builder var serviceProvider = new ServiceCollection() .AddLogging(loggingBuilder => { loggingBuilder.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); loggingBuilder.AddLog4Net(); loggingBuilder.AddConsole(); }) .BuildServiceProvider(); Services Collection How to use using Services Collection var […]
You can maintain historical changes made in a table by creating another table with the same schema which holds historical data. SomeTable is the base table containing current data rows SomeTable-History has exact same schema with 2 additional columns trans_type varchar(10) date_time datetime and this table will hold historical data Below triggers created on SomeTable […]
Make changes in web.config file as follows <configuration> <configSections> ... <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections> <appSettings> ... <add key="log4net.Config" value="log4net.config"/> <add key="log4net.Config.Watch" value="True"/> </appSettings> <log4net> <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> <file type="log4net.Util.PatternString" value="D:/Logs/TTG SmartANPR REST Service/smartanprrest_%date{ddMMyyyy}.log" /> <appendToFile value="true" /> <rollingStyle value="Date" /> <datePattern value="yyyyMMdd" /> <staticLogFileName value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %level - %message%newline" […]