« first day (2272 days earlier)      last day (1845 days later) » 

 
2 hours later…
 
2 hours later…
 
1 hour later…
 
2 hours later…
 
2 hours later…
11:38 AM
@Queen k
 
11:53 AM
1 message moved from JavaScript
 
12:12 PM
1 message moved from JavaScript
 
 
1 hour later…
1:23 PM
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddLogging(builder => builder.AddLog4Net("log4net.config"));
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
loggerFactory.AddLog4Net();
app.UseMvc();
}
I have it in log4.net config
<?xml version="1.0" encoding="utf-8"?>
<log4net debug="true">
<root>
<level value="Error" />
<appender-ref ref="AuditAppender" />
</root>
<appender name="AuditAppender" type="Logger.Log4NetAuditAppender,Logger">
</appender>

</log4net>
I have new solution called Logger with class Log4NetAuditAppender which works as custom appender
public class Log4NetAuditAppender : AppenderSkeleton
{
public Log4NetAuditAppender(){
}
protected override void Append(LoggingEvent loggingEvent)
{
Console.WriteLine("coming inside");
}


}
}
and my controller is
[Route("api/[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
private ILogger<ValuesController> _logger;
public ValuesController(ILogger<ValuesController> logger) { _logger = logger;}
[HttpGet("{id}")]
public ActionResult<string> Get(int id)
{
 
10 messages moved from C#
 
1:58 PM
0
Q: Unable to call custom appender for Log4Net in .Net Core API

ANIL MANEHere is my code. I am using only Microsoft.Extensions.Logging.Log4Net.AspNetCore reference I am getting following exception in debug window. can you please guide me in setting up log4net config file. log4net: configuring repository [log4net-default-repository] using XML element log4net: Config...

 
2:29 PM
Hiya o/ (DEVELOPMENT VERSION; smileycreations15/natty-test)
 
foxxxxxxy
 
Zoe
1 message moved from Java
 
[ Natty | FMS ] Link to Post BodyLength: 48 Rep: 1 Contains ?; Low Length; No Code Block; One Line only; Low Rep; Body Starts With: Any luck with your question? plz let me know too 4.5;
 
2:45 PM
2 messages moved from SOBotics
 
2:58 PM
[ Natty | FMS ] Link to Post BodyLength: 162 Rep: 1 Ends with ?; Low Length; No Code Block; One Line only; Low Rep; Body Starts With: I am having a similar question. I am looking for help in converting the . data data from INCA MDF. Did any one tried to read the time series data from the .mdf ? 5.0;
 
@NAA-Reporter tp
 
2 messages moved from SOBotics
 
[ Natty | FMS ] Link to Post BodyLength: 146 Rep: 1 Low Length; No Code Block; One Line only; Starts with Keyword; Low Rep; Unregistered User; Body Starts With: can i check Group of ip is ping a particulr ip or not likewise need to check that 192.168.121.121 and 192.168.122.121 is ping 192.168.33.33 or not 5.0;
 
1 message moved from SOBotics
 
4:24 PM
example:
function ini() {
ini = null;
}

ini();
 
1 message moved from JavaScript
 
 
2 hours later…
 
2 hours later…
 
1 hour later…

« first day (2272 days earlier)      last day (1845 days later) »