Пример #1
0
        public async Task ViewCurrentLogLevel(IDialogContext context, LuisResult result)
        {
            var currentLogLevel = await CommandControlService.GetCurrentLogLevel();

            await context.PostAsync($"Your Sitecore's log level is current set to {currentLogLevel}.");

            context.Wait(MessageReceived);
        }
Пример #2
0
        public async Task SetLogLevel(IDialogContext context, LuisResult result)
        {
            var level = result.Entities.FirstOrDefault(x => x.Type.StartsWith(LogLevelPrefix))?.Entity.Replace(LogLevelPrefix, string.Empty);

            var currentLogLevel = await CommandControlService.SetLogLevel(level);

            await context.PostAsync($"Your Sitecore's log level has been set to {currentLogLevel}.");

            context.Wait(MessageReceived);
        }