Beispiel #1
0
        private static void Formatted(string fitex, string format, params object[] args)
        {
            string   ip       = LibHelper.GetClientIP();
            DateTime time     = DateTime.Now;
            string   logFilex = string.Format("【{0} - {1:yyyy-MM-dd HH:mm:ss,ms} {2}】", fitex, time, ip);

            if (LogSaveType == 1)
            {
                logToTable(ip, GetDomain(), fitex, time, string.Concat(logFilex, string.Format(format, args)));
            }
            else
            {
                FileUtils.AppendTextFileLine(GetLogFileName(), string.Concat(logFilex, string.Format(format, args)), true);
            }
        }
Beispiel #2
0
        private static void writeLog(string fitex, object message)
        {
            string   ip   = LibHelper.GetClientIP();
            DateTime time = DateTime.Now;

            if (LogSaveType == 1)
            {
                logToTable(ip, GetDomain(), fitex, time, string.Concat(message));
            }
            else
            {
                string logFilex = string.Format("【{0} - {1:yyyy-MM-dd HH:mm:ss,ms} {2}】", fitex, time, ip);
                FileUtils.AppendTextFileLine(GetLogFileName(), string.Concat(logFilex, message), true);
            }
        }