Esempio n. 1
0
        /// <summary>
        /// Log the error
        /// </summary>
        /// <param name="ex">the Exception</param>
        public static void Write(string ex)
        {
            LogError.StartLog(System.Configuration.ConfigurationSettings.AppSettings["LogFile"]);
            MyLogListener myLog = MyLogListener.instance;

            myLog.WriteLine(ex);
        }
Esempio n. 2
0
        /// <summary>
        /// Log the error
        /// </summary>
        /// <param name="ex">the Exception</param>
        public static void Write(Exception ex)
        {
            LogError.StartLog(System.Configuration.ConfigurationSettings.AppSettings["LogFile"]);
            MyLogListener myLog = MyLogListener.instance;

            myLog.WriteLine(string.Format("{0} {1} {2}", ex.InnerException, ex.Message, ex.StackTrace));
        }