public void Log(string message)
{
try
{
string logFileName = "c:\\log\\LogName" + DateTime.Now.ToString("yyyy-MM-dd") + ".log";
using (TextWriter logFile = TextWriter.Synchronized(File.AppendText(logFileName)))
{
logFile.WriteLine("\r\n");
logFile.WriteLine(DateTime.Now);
logFile.WriteLine(message);
logFile.Flush();
logFile.Close();
}
}
catch(Exception ex)
{
throw new InvalidPluginExecutionException("Log Create Error:" + ex.Message.ToString());
}
}