Esempio n. 1
0
        public HttpResponseMessage SetLogMessageTraceLevel(string level)
        {
            var log4NetLevel = Log4NetUtil.ParseLevel(level);

            if (log4NetLevel == null)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest));
            }


            ServiceLocator.ConfigService.SetLogMessageTraceLevel(log4NetLevel);

            return(new HttpResponseMessage(HttpStatusCode.OK));
        }
Esempio n. 2
0
        public Level GetLogMessageTraceLevel()
        {
            var log4NetLevel = Log4NetUtil.ParseLevel(ServiceLocator.SettingsService.GetSetting(ConfigKeyLogMessageTraceLevel, Level.Debug.ToString()));

            return(log4NetLevel ?? Level.All);
        }