Updating logger to split into levels depending on namespace, to autoflush and also to update log levels on build for azure or CI.

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-12-07 15:24:43 -08:00
parent bf1c0e2589
commit 95841b5fbc
9 changed files with 35 additions and 30 deletions
+13 -2
View File
@@ -2,13 +2,24 @@
<log4net>
<root>
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF -->
<priority value="INFO" />
<priority value="WARN" />
<appender-ref ref="RollingLogFileAppender" />
</root>
<logger name="Orchard.Localization">
<priority value="WARN" />
<appender-ref ref="RollingLogFileAppender" />
</logger>
<logger name="Orchard.Data.SessionLocator">
<priority value="INFO" />
<appender-ref ref="RollingLogFileAppender" />
</logger>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="App_Data/logs/orchard-debug.txt" />
<appendToFile value="true"/>
<appendToFile value="true" />
<immediateFlush value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%logger - %message%newline" />
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;
using JetBrains.Annotations;
@@ -3,8 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using FluentNHibernate.Conventions;
using FluentNHibernate.Conventions.Instances;
using Orchard.Environment.Descriptor;
using Orchard.Environment.Descriptor.Models;
using Orchard.Environment.ShellBuilders.Models;
namespace Orchard.Data.Conventions {
@@ -6,9 +6,7 @@ using FluentNHibernate.Automapping.Alterations;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using FluentNHibernate.Conventions.Helpers;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using Orchard.ContentManagement.Records;
using Orchard.Data.Conventions;
using Orchard.Environment.ShellBuilders.Models;
@@ -1,7 +1,4 @@
using System;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using NHibernate;
using FluentNHibernate.Cfg.Db;
using NHibernate.Cfg;
namespace Orchard.Data.Providers {
-2
View File
@@ -1,6 +1,5 @@
using System;
using System.Collections;
using System.Data;
using NHibernate;
using NHibernate.SqlCommand;
using NHibernate.Type;
@@ -22,7 +21,6 @@ namespace Orchard.Data {
public ILogger Logger { get; set; }
public ISession For(Type entityType) {
Logger.Debug("Acquiring session for {0}", entityType);
+1 -3
View File
@@ -1,9 +1,7 @@
using System;
using System.Web;
using System.Web;
using Orchard.Environment.Extensions.Models;
using Orchard.Security;
using Orchard.Settings;
using Orchard.Themes;
namespace Orchard {
public abstract class WorkContext {