Log a message using Log4Net in c#

Rajnilari2015
Posted by Rajnilari2015 under C# category on | Points: 40 | Views : 283
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Log4NetTest
{
class Program
{
private static readonly log4net.ILog log =
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

static void Main(string[] args)
{
log.Info("Hello World");
}
}
}

Comments or Responses

Login to post response