Revision 5120f3cb trunk/Pithos.Client.WPF/AppBootstrapper.cs

b/trunk/Pithos.Client.WPF/AppBootstrapper.cs
26 26

  
27 27
	    public AppBootstrapper()
28 28
	    {
29
	        ConfigureLogging();
29
            log4net.Config.XmlConfigurator.Configure();
30 30

  
31 31
            LogManager.GetLog = type => new log4netLogger(type);
32 32
	    }
33 33

  
34
        private static void ConfigureLogging()
35
        {
36
            var patternLayout = new PatternLayout();
37
            patternLayout.ConversionPattern = "%logger (%property{myContext}) [%level]- %message%newline";
38
            patternLayout.ActivateOptions();
39
            var appender = new TraceAppender { Layout = patternLayout };
40
            appender.AddFilter(new LevelRangeFilter{LevelMin=log4net.Core.Level.Info,LevelMax=log4net.Core.Level.Fatal});
41
            appender.ActivateOptions();
42
            
43
            BasicConfigurator.Configure(appender);            
44
        }
45

  
46 34
		/// <summary>
47 35
		/// By default, we are configured to use MEF
48 36
		/// </summary>
......
57 45
                catalog.Catalogs.Add(new AssemblyCatalog(type.Assembly));
58 46
            }
59 47

  
60
                      
61

  
62

  
63 48
			container = new CompositionContainer(catalog);
64 49

  
65 50
			var batch = new CompositionBatch();
......
70 55
		    batch.AddExportedValue(catalog);
71 56

  
72 57

  
73

  
74

  
75

  
76

  
77 58
			container.Compose(batch);
78 59
		}
79 60

  

Also available in: Unified diff