コード例 #1
0
        /*==================================================================================================================================
        * Public Methods
        *=================================================================================================================================*/

        #region CRUD
        //----------------------------------------------------------------------------------------------------------------------------------
        // CRUD
        //----------------------------------------------------------------------------------------------------------------------------------
        public questStatus Read(BaseUserSessionViewModel baseUserSessionViewModel, out LogSettingsViewModel logSettingsViewModel)
        {
            // Initialize
            questStatus status = null;

            logSettingsViewModel = null;


            // Read
            Quest.Functional.Logging.LogSetting logSetting = null;
            LogSettingsMgr logSettingsMgr = new LogSettingsMgr(this.UserSession);

            status = logSettingsMgr.Read(out logSetting);
            if (!questStatusDef.IsSuccess(status))
            {
                return(status);
            }

            // Transfer model.
            logSettingsViewModel = new LogSettingsViewModel(this.UserSession, baseUserSessionViewModel);
            BufferMgr.TransferBuffer(logSetting, logSettingsViewModel);


            return(new questStatus(Severity.Success));
        }
コード例 #2
0
        /*----------------------------------------------------------------------------------------------------------------------------------
        * Logging
        *---------------------------------------------------------------------------------------------------------------------------------*/
        private questStatus loadLogSettings()
        {
            // Initialize
            questStatus status = null;


            // Get log settings.
            LogSetting     logSetting     = null;
            LogSettingsMgr logSettingsMgr = new LogSettingsMgr(this.UserSession);

            status = logSettingsMgr.Read(out logSetting);
            if (!questStatusDef.IsSuccess(status))
            {
                this._logSetting = new LogSetting();
                return(status);
            }
            this._logSetting = logSetting;

            if (this._logSetting.bLogHTTPRequests)
            {
                _httpRequestLogsMgr = new HTTPRequestLogsMgr(this.UserSession);
            }
            if (this._logSetting.bLogPortal)
            {
                _portalRequestLogsMgr = new PortalRequestLogsMgr(this.UserSession);
            }
            return(new questStatus(Severity.Success));
        }