public static void Initialize()
{
EventSink.Command += new CommandEventHandler( EventSink_Command );
if ( !Directory.Exists( "Logs" ) )
Directory.CreateDirectory( "Logs" );
string directory = "Logs/Commands";
if ( !Directory.Exists( directory ) )
Directory.CreateDirectory( directory );
try
{
m_Output = new StreamWriter( Path.Combine( directory, String.Format( "{0}.log", DateTime.Now.ToLongDateString() ) ), true );
m_Output.AutoFlush = true;
m_Output.WriteLine( "##############################" );
m_Output.WriteLine( "Log started on {0}", DateTime.Now );
m_Output.WriteLine();
}
catch
{
}
}