/// <summary>
        ///     Configure the console logger and set it to filter logs not related to the x42 server.
        /// </summary>
        /// <param name="loggerFactory">The logger factory to add the console logger.</param>
        public static void AddConsoleWithFilters(this ILoggerFactory loggerFactory)
        {
            ConsoleLoggerSettings consoleLoggerSettings = new ConsoleLoggerSettings
            {
                Switches =
                {
                    { "Default",              LogLevel.Information },
                    { "System",               LogLevel.Warning     },
                    { "Microsoft",            LogLevel.Warning     },
                    { "Microsoft.AspNetCore", LogLevel.Error       }
                }
            };

            ConsoleLoggerProvider consoleLoggerProvider = new ConsoleLoggerProvider(consoleLoggerSettings);

            loggerFactory.AddProvider(consoleLoggerProvider);

            ExtendedLoggerFactory extendedLoggerFactory = loggerFactory as ExtendedLoggerFactory;

            Guard.NotNull(extendedLoggerFactory, nameof(extendedLoggerFactory));
            extendedLoggerFactory.ConsoleLoggerProvider = consoleLoggerProvider;
            extendedLoggerFactory.ConsoleSettings       = consoleLoggerSettings;
        }