private void CheckFile()
{
if (!DateTime.Today.Equals(this.date))
{
if (os != null)
{
Close();
}
this.date = DateTime.Today;
Directory.CreateDirectory(path);
this.filename = System.IO.Path.Combine(path, DateTime.Now.ToString("yyyy-MM-dd") + ".log");
lock (WriteLock)
{
fs = new FileStream(filename, FileMode.Append);
os = new StreamWriter(fs);
os.AutoFlush = true;
}
}
}