Beispiel #1
0
        public void Writer(string conternt)
        {
            string filename = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "Logger\\" + System.DateTime.Now.ToString("yyyy-MM-dd");

            if (File.Exists(filename))
            {
                _iwrite.WriteFile(filename, DateTime.Now.ToString() + ":" + conternt + "\n");
            }
            else
            {
                _iwrite.DeelDirectoryInfo(System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "Logger\\", Mode.Create);
                _iwrite.FileBaseDeel(filename, MyFileMode.Create);
                _iwrite.WriteFile(filename, conternt);
            }
        }
Beispiel #2
0
 private void Loaded()
 {
     _LoggerBasePath = System.IO.Directory.GetCurrentDirectory().Replace("bin\\Debug", "") + "StyletLogger\\Logger\\" + DateTime.Now.ToString("D");
     if (!File.Exists(_LoggerBasePath))
     {
         _writeFile.FileBaseDeel(_LoggerBasePath, MyFileMode.Create);
     }
 }