2 using System.Collections.Generic;
5 using Seci.Definitions;
25 String fileName = setupPaths();
28 String mess = message;
29 mess = mess.Replace(
'\n',
' ');
32 StreamWriter SW =
new StreamWriter(fileName,
true);
33 SW.WriteLine(DateTime.Now.ToLongTimeString() +
" SOURCE: " + source + Environment.NewLine + mess + Environment.NewLine);
38 ErrorLogger.SeciError(
"MessageLogger", err);
51 String directory = Status.ErrorDir;
53 DirectoryInfo di =
new DirectoryInfo(directory);
56 if (di.Exists ==
false)
62 String fileName = directory +
"\\" + DateTime.Today.Year +
"_" + DateTime.Now.ToString(
"MMM") +
"_" + DateTime.Today.Day +
"_log.txt";
static String setupPaths()
Method for setting up the logging directory. The log files are stored in a directory structure based ...
This class is used for logging messages to file; typical messages are configuration loaded...
static void WriteMessage(String source, String message)
Method for actually writing the message to the file. If the file does not exist it is created otherwi...