Torna al Thread
if (this.clsDatiFileIniService.PathLog != "")
{
try
{
if (System.IO.Directory.Exists(this.clsDatiFileIniService.PathLog) == true)
{
using (StreamWriter w = File.AppendText(this.clsDatiFileIniService.PathLog + "\\STRUMETS_SERVICE_"
+ DateTime.Now.Day.ToString()
+ "_"
+ DateTime.Now.Month.ToString()
+ "_"
+ DateTime.Now.Year.ToString()
+ ".TXT"))
{
w.WriteLine(Properties.Settings.Default.NomeServizio + StringaDaLoggare);
}
}
catch (Exception e)
{
writeEventLogWindows("Non riesco a scrivere nel file di log: " + e.Message, EventLogEntryType.Error );
this.Stop();
}