Esempio n. 1
0
        /// <summary>
        /// Inserts into the log in the database
        /// </summary>
        /// <param name="LogType"></param>
        /// <param name="LogMessage"></param>
        public void InsertLogger(string LogSource, StatCodes LogType, string LogMessage)
        {
            try
            {
                string logType = "Unknown";
                switch (LogType)
                {
                case StatCodes.Statistic:
                    logType = "Stat";
                    break;

                case StatCodes.Info:
                    logType = "Info";
                    break;

                case StatCodes.Error:
                    logType = "Error";
                    break;

                default:
                    logType = "Unknown";
                    break;
                }
                sql.QuerySQL("Insert into dataTblLogs (LogSource,LogType,LogMessage) Values ('" + LogSource + "','" + logType + "','" + LogMessage + "')", ref sqlStatus);
            }
            catch (Exception ex)
            {
                ErrorLogEntry(ex.Message);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Inserts into the log in the database using the title as the log type
 /// </summary>
 /// <param name="LogType"></param>
 /// <param name="LogMessage"></param>
 public void InsertLogger(StatCodes LogType, string LogMessage)
 {
     try
     {
         sql.QuerySQL("Insert into dataTblLogs (LogSource,LogType,LogMessage) Values ('" + Title + "','" + LogType + "','" + LogMessage + "')", ref sqlStatus);
     }
     catch (Exception ex)
     {
         ErrorLogEntry(ex.Message);
     }
 }