private static ILog GetLoggerForUseWithScope()
        {
            var adapter = new CuttingEdgeLoggerFactoryAdapter();

            var scopeProvider = LoggingProviderScope.GetProviderFromConfiguration();

            return(adapter.GetLogger(scopeProvider.Name));
        }
Exemplo n.º 2
0
        public string GetLoggerName(string name)
        {
            var adapter = new CuttingEdgeLoggerFactoryAdapter();

            var logger = (CuttingEdgeLogger)adapter.GetLogger(name);

            return(logger.Name);
        }
        private static ILog GetLoggerWithThreshold(LoggingEventType threshold)
        {
            var loggingProvider =
                (from provider in Logger.Providers
                 where provider.Threshold == threshold
                 select provider).FirstOrDefault();

            if (loggingProvider == null)
            {
                Assert.Fail("No LoggingProvider with threshold of {0} was found.", threshold);
            }

            var adapter = new CuttingEdgeLoggerFactoryAdapter();

            return(adapter.GetLogger(loggingProvider.Name));
        }
Exemplo n.º 4
0
 public void CallDefaultConstructor()
 {
     var adapter = new CuttingEdgeLoggerFactoryAdapter();
 }
Exemplo n.º 5
0
 public void CallConstructorWithPropertiesArgument()
 {
     var adapter = new CuttingEdgeLoggerFactoryAdapter(new NameValueCollection());
 }