private string getIcon(LogItem logElement)
 {
     switch (logElement.Type)
     {
         case LogItem.LogType.Audit:
             return ICON_AUDIT;
         case LogItem.LogType.Warning:
             return ICON_WARN;
         case LogItem.LogType.Info:
             return ICON_INFO;
         case LogItem.LogType.Error:
             return ICON_ERROR;
     }
     return string.Empty;
 }
Exemplo n.º 2
0
        public static LogItem Make(DateTime date, string pid, string type, string text)
        {
            LogItem logItem;
            if (type == "INFO  AUDIT")
            {
                AuditItem auditItem = new AuditItem();
                auditItem.Initialize(text);
                logItem = auditItem;
            }
            else
            {
                logItem = new LogItem();
            }
            logItem.DateTime = date;
            logItem.Process = pid;
            logItem.Type = parse(type);
            logItem.Message = text;

            return logItem;
        }