NET Logging Library
Logging to HTTP Post
Basic Tasks > Logging to HTTP Post

The HTTP Post target will post a log message to a website URL using HTTP Post.

It has these properties that can be configured:

 

 

//Example runtime configuration, can also use log.config, app.config, or web.config
Log.ResetConfiguration();  
HttpPostTarget target = new HttpPostTarget();  
target.Uri = "http://www.mywebsite.com/mylogpage.aspx"   
Log.Config.Targets.Add(target);

Log.Debug("This is a test");

Console.WriteLine(target.LastResponse);
Console.WriteLine(target.LastStatusCode);