コード例 #1
0
ファイル: Logger.cs プロジェクト: vaibhavb/walkme
 /// <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);
 }
コード例 #2
0
ファイル: AuditLog.cs プロジェクト: vaibhavb/walkme
        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;
        }
コード例 #3
0
ファイル: Logger.cs プロジェクト: vaibhavb/walkme
 /// <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);
 }
コード例 #4
0
ファイル: Logger.cs プロジェクト: vaibhavb/walkme
 /// <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;
     }
 }