Using log4net declared as:
private readonly ILog log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType());
In an async method or task, like this one:
public async void CheckSomething()
{
log.Info(null);
//....
}
logs MoveNext
instead of CheckSomething
.
Any idea how to make it log an actual method name?