Example #1
0
        /// <summary>获取日志操作对象
        ///
        /// </summary>
        /// <returns></returns>
        public static ILog GetLogger()
        {
            string LogType = GetLogType();

            if (LogType == string.Empty)
            {
                return(null);
            }
            ILog logger = null;

            switch (LogType.ToLower())
            {
            case "sqlitelog":
                logger = new Nikita.Assist.Logger.DAL.LocalLogDAL();
                break;

            case "sqlserverlog":
                logger = new Nikita.Assist.Logger.DAL.SqlserverLogDAL();
                break;

            case "mysqllog":
                logger = new Nikita.Assist.Logger.DAL.MysqllogDAL();
                break;

            case "oraclelog":
                break;

            default:
                break;
            }
            return(logger);
        }
Example #2
0
        /// <summary>获取日志信息
        ///
        /// </summary>
        /// <param name="strWhere">过滤条件</param>
        /// <returns></returns>
        public static DataSet GetLogInfo(string strWhere)
        {
            string LogType = GetLogType();

            if (LogType == string.Empty)
            {
                return(null);
            }
            DataSet ds = new DataSet();

            switch (LogType.ToLower())
            {
            case "sqlitelog":
                ds = new Nikita.Assist.Logger.DAL.LocalLogDAL().GetList(strWhere);
                break;

            case "sqlserverlog":
                ds = new Nikita.Assist.Logger.DAL.SqlserverLogDAL().GetList(strWhere);
                break;

            case "mysqllog":
                ds = new Nikita.Assist.Logger.DAL.MysqllogDAL().GetList(strWhere);
                break;

            case "oraclelog":
                break;

            default:
                break;
            }
            return(ds);
        }