Hello,
I'm having some trouble with LogToFile.Log since I upgraded to 8.8.
I have a custom module in which I execute some code. In this code I use tasks. Outside of a task I can log fine, no problem. However if I do that :
Task taskB = Task.Factory.StartNew(() => myFunction())
.ContinueWith(task =>
{
LogToFile.Log("test", "MyFile", LogToFile.LogType.ManyEntriesPerFile);
});
Then I get a nullreferenceexception. Here is the stack trace :
at Dynamicweb.LogToFile.GetFileName(LogType logType, String baseFolder)
at Dynamicweb.LogToFile.Log(String message, Exception logException, String folder, LogType newLogFile, Boolean useExtendedPropertyLogging, LogElements logElements, Boolean disable71Logging)
at Dynamicweb.LogToFile.Log(String message, Exception logException, String folder, LogType newLogFile, Boolean useExtendedPropertyLogging, LogElements logElements)
at Dynamicweb.LogToFile.Log(String message, String folder, LogType newLogFile)
at (my module).<>c__DisplayClass3.<GetContent>b__0(Task`1 task) in (my module path)
at System.Threading.Tasks.Task.Execute()