Esempio n. 1
0
        /// <summary>
        /// Called internally by the SDK to create a configuration instance. Applications do not need
        /// to call this method.
        /// </summary>
        /// <returns>the logging configuration</returns>
        public LoggingConfiguration CreateLoggingConfiguration()
        {
            ILogAdapter logAdapter;

            if (_logAdapter is null)
            {
                logAdapter = PlatformSpecific.Logging.DefaultAdapter
                             .Level(_minimumLevel ?? LogLevel.Info);
            }
            else
            {
                logAdapter = _minimumLevel.HasValue ?
                             _logAdapter.Level(_minimumLevel.Value) :
                             _logAdapter;
            }
            return(new LoggingConfiguration(
                       _baseLoggerName,
                       logAdapter
                       ));
        }
Esempio n. 2
0
        /// <inheritdoc/>
        public LoggingConfiguration CreateLoggingConfiguration()
        {
            ILogAdapter logAdapter;

            if (_logAdapter is null)
            {
                logAdapter = Logs.ToConsole.Level(_minimumLevel ?? LogLevel.Info);
            }
            else
            {
                logAdapter = _minimumLevel.HasValue ?
                             _logAdapter.Level(_minimumLevel.Value) :
                             _logAdapter;
            }
            return(new LoggingConfiguration(
                       _baseLoggerName,
                       logAdapter,
                       _logDataSourceOutageAsErrorAfter
                       ));
        }