public static void WriteLine(Mobile from, string text)
        {
            try
            {
                m_Output.WriteLine("{0}: {1}: {2}", DateTime.Now.ToShortTimeString(), TownspersonLogging.Format(from), text);

                string path = Core.BaseDirectory;
                AppendPath(ref path, "Logs");
                AppendPath(ref path, "Townsperson");
                path = Path.Combine(path, String.Format("{0}.log", DateTime.Now.ToLongDateString()));

                using (StreamWriter sw = new StreamWriter(path, true))
                    sw.WriteLine("{0}: {1}: {2}", DateTime.Now, TownspersonLogging.Format(from), text);
            }
            catch
            {
            }
        }
Beispiel #2
0
        public static void WriteLine(Mobile from, string text)
        {
            try
            {
                m_Output.WriteLine("{0}: {1}: {2}", DateTime.Now.ToShortTimeString(), TownspersonLogging.Format(from), text);

                // Crée un double des logs sans réelle raison ?
                //string path = Directories.AppendPath(Directories.logs, "Townsperson" );
                //path = Path.Combine(path, String.Format("{0}.log", Directories.Today));

                //using ( StreamWriter sw = new StreamWriter( path, true ) )
                //    sw.WriteLine( "{0}: {1}: {2}", DateTime.Now, TownspersonLogging.Format( from ), text );
            }
            catch
            {
            }
        }