public static void EventSendLog(string id, string name, LogMethodTag tag, string format, params object[] param) { string classname = id; int pos = id.LastIndexOf("."); if (pos >= 0) { classname = id.Substring(pos + 1); } string customerMsg = "string format error!"; try { customerMsg = string.Format(format, param); } catch (Exception) { } string logmsg = string.Format("(EventSend) - [{0}] - ({1}) - {2}", name, tag.ToString(), customerMsg); // if (m_bEnableAllLog || (m_bEnableLog && !MatchKeyInfoIsMask(classname, logmsg))) // { // ILog Logger4DevCtrl = LogManager.GetLogger4DevCtrl("DEBUG"); // Logger4DevCtrl.Info(logmsg); // } m_logFile.bWrite("DeviceControl", classname, logmsg); }
public static void EventRecvLog(string id, string name, LogMethodTag tag, string format, params object[] param) { string classname = id; int pos = id.LastIndexOf("."); if (pos >= 0) { classname = id.Substring(pos + 1); } string customerMsg = "string format error!"; try { customerMsg = string.Format(format, param); } catch (Exception) { } string logmsg = string.Format("{0} - (EventRecv) - [{1}] - ({2}) - {3}", classname, name, tag.ToString(), customerMsg); // if (m_bEnableAllLog || (m_bEnableLog && !MatchKeyInfoIsMask(classname, logmsg))) // { // ILog logger = LogManager.GetLogger("DEBUG"); // logger.Info(logmsg); // } m_logFile.bWrite("AppControl|Application", "EventRecvLog", logmsg); }