Example #1
0
 public LogInfo()
 {
     _LogGUID = Guid.NewGuid().ToString();
     _BypassBuffering = false;
     _LogProperties = new LogProperties();
     _LogPortalID = -1;
     _LogPortalName = "";
     _LogUserID = -1;
     _LogUserName = "";
 }
Example #2
0
        public LogInfo()
        {
            LogGUID = Guid.NewGuid().ToString();
            BypassBuffering = false;
            LogProperties = new LogProperties();
            LogPortalID = -1;
            LogPortalName = "";
            LogUserID = -1;
            LogEventID = -1;
            LogUserName = "";
			Exception = new ExceptionInfo();
        }
Example #3
0
        private void RecordAuditEventLog(string query)
        {
            var props = new LogProperties {new LogDetailInfo("User", UserInfo.Username), new LogDetailInfo("SQL Query", query)};

            var elc = new EventLogController();
            elc.AddLog(props, PortalSettings, UserId, EventLogController.EventLogType.HOST_SQL_EXECUTED.ToString(), true);
        }
Example #4
0
 public void AddLog(string propertyName, string propertyValue, PortalSettings portalSettings, int userID, string logType)
 {
     var properties = new LogProperties();
     var logDetailInfo = new LogDetailInfo {PropertyName = propertyName, PropertyValue = propertyValue};
     properties.Add(logDetailInfo);
     AddLog(properties, portalSettings, userID, logType, false);
 }
Example #5
0
        public void AddLog(LogProperties properties, PortalSettings portalSettings, int userID, string logTypeKey, bool bypassBuffering)
        {
			//supports adding a custom string for LogType
            var logInfo = new LogInfo {LogUserID = userID, LogTypeKey = logTypeKey, LogProperties = properties, BypassBuffering = bypassBuffering};
            if (portalSettings != null)
            {
                logInfo.LogPortalID = portalSettings.PortalId;
                logInfo.LogPortalName = portalSettings.PortalName;
            }
            AddLog(logInfo);
        }
Example #6
0
        private void RecordAuditEventLog(string query)
        {
            var props = new LogProperties { new LogDetailInfo("User", UserInfo.Username), new LogDetailInfo("SQL Query", query) };

            //Add the event log with host portal id.
            var log = new LogInfo
            {
                LogUserID = UserId,
                LogTypeKey = EventLogController.EventLogType.HOST_SQL_EXECUTED.ToString(),
                LogProperties = props,
                BypassBuffering = true,
                LogPortalID = Null.NullInteger
            };

            LogController.Instance.AddLog(log);
        }
        public void AddLog(LogProperties objProperties, PortalSettings _PortalSettings, int UserID, string LogTypeKey, bool BypassBuffering)
        {
            //Used for custom/on-the-fly  log types

            LogController objLogController = new LogController();
            LogInfo objLogInfo = new LogInfo();
            objLogInfo.LogUserID = UserID;
            objLogInfo.LogPortalID = _PortalSettings.PortalId;
            objLogInfo.LogTypeKey = LogTypeKey;
            objLogInfo.LogProperties = objProperties;
            objLogInfo.LogPortalName = _PortalSettings.PortalName;
            objLogInfo.BypassBuffering = BypassBuffering;
            objLogController.AddLog(objLogInfo);
        }
 public void AddLog(string PropertyName, string PropertyValue, PortalSettings _PortalSettings, int UserID, string LogType)
 {
     //Used for custom/on-the-fly  log types
     LogProperties objProperties = new LogProperties();
     LogDetailInfo objLogDetailInfo = new LogDetailInfo();
     objLogDetailInfo.PropertyName = PropertyName;
     objLogDetailInfo.PropertyValue = PropertyValue;
     objProperties.Add(objLogDetailInfo);
     AddLog(objProperties, _PortalSettings, UserID, LogType, false);
 }
 public void AddLog(string PropertyName, string PropertyValue, PortalSettings _PortalSettings, int UserID, EventLogType objLogType)
 {
     //Used for DotNetNuke native  log types
     LogProperties objProperties = new LogProperties();
     LogDetailInfo objLogDetailInfo = new LogDetailInfo();
     objLogDetailInfo.PropertyName = PropertyName;
     objLogDetailInfo.PropertyValue = PropertyValue;
     objProperties.Add(objLogDetailInfo);
     AddLog(objProperties, _PortalSettings, UserID, objLogType.ToString(), false);
 }
 public void AddLog(PortalSettings _PortalSettings, int UserID, EventLogType objLogType)
 {
     //Used for DotNetNuke native  log types
     LogProperties objProperties = new LogProperties();
     AddLog(objProperties, _PortalSettings, UserID, objLogType.ToString(), false);
 }