Ejemplo n.º 1
0
        public static IList <string> GetLogString(LogType logType, DateTime date, string EmailAddress)
        {
            IList <string> retList = new List <string>();

            switch (logType)
            {
            case LogType.SysLog:
                _GetLogString(retList, FileExcute.ReadFile(string.Format("{0}{1}{3}", PathInfo.GetSysLogDir, date.ToString("yyyy-MM-dd"), ".log")));
                break;

            case LogType.UserErrorLog:
                _GetLogString(retList, FileExcute.ReadFile(string.Format("{0}{1}_{2}{3}", PathInfo.GetUserErrorLogDir(EmailAddress), EmailAddress, date.ToString("yyyy-MM-dd"), ".log")));
                break;

            case LogType.UserLog:
                _GetLogString(retList, FileExcute.ReadFile(string.Format("{0}{1}_{2}{3}", PathInfo.GetUserLogDir(EmailAddress), EmailAddress, date.ToString("yyyy-MM-dd"), ".log")));
                break;
            }
            return(retList);
        }
Ejemplo n.º 2
0
 public static void UserErrorLog(string EmailAddress, string logContent)
 {
     CreateLog(string.Format("{0}{1}_{2}{3}", PathInfo.GetUserErrorLogDir(EmailAddress), EmailAddress, DateTime.Now.ToString("yyyy-MM-dd"), ".log"), logContent);
 }