Beispiel #1
0
 /// <summary>
 /// Logs the given info to the audit table in the pplog database
 /// </summary>
 public void Log(
     String executingEntity,
     WlkMiEvent eventId,
     WlkMiCat cat,
     String msg)
 {
     Log(executingEntity, eventId, cat, msg, null);
 }
Beispiel #2
0
        public static DataSet GetLogsByCategory(WlkMiCat categoryType)
        {
            SqlParameter param = new SqlParameter("@categoryType", categoryType);
            SqlCommand sql = new SqlCommand(
                "select * from wc_audit_log where event_id=@categoryType",
                new SqlConnection(Constants.ConnectionString));
            sql.Parameters.Add(param);

            DataSet ds = new DataSet();
            SqlDataAdapter sqlData = new SqlDataAdapter(sql);
            sqlData.Fill(ds);
            return ds;
        }
Beispiel #3
0
 /// <summary>
 /// Logs the given info to the audit table in the log database
 /// </summary>
 public void Log(
     String executingEntity,
     WlkMiEvent eventId,
     WlkMiCat cat,
     String msg,
     Exception e)
 {
     Log(executingEntity, eventId, cat, msg, e, false);
 }
Beispiel #4
0
 /// <summary>
 /// Logs the given info to the audit table in the wclog database
 /// </summary>
 public void Log(
     String executingEntity,
     WlkMiEvent eventId,
     WlkMiCat cat,
     String msg,
     Exception e,
     bool forceIntoEventLog)
 {
     switch (cat)
     {
         case WlkMiCat.Error: Logger.Error(
            executingEntity + ":" + eventId.ToString() + ":" + msg, e);
             break;
         case WlkMiCat.Warning: Logger.Warn(
             executingEntity + ":" + eventId.ToString() + ":" + msg, e);
             break;
         default:
             Logger.Info(
                 executingEntity + ":" + eventId.ToString() + ":" + msg, e);
             break;
     }
 }