<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="spring">
      <section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
    </sectionGroup>
    <sectionGroup name="common">
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
    </sectionGroup>
    <section name="databaseSettings" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
  </configSections>

  <spring>
    <parsers>
      <parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" />
      <parser type="Spring.Transaction.Config.TxNamespaceParser, Spring.Data" />
    </parsers>    
  </spring>

  <!-- These properties are referenced in Dao.xml -->
  <databaseSettings>
    <add key="db.datasource" value="(local);Integrated Security=true" />
    <add key="db.user" value="springqa" />
    <add key="db.password" value="springqa" />
    <add key="db.database" value="Northwind" />
  </databaseSettings>

  <common>
    <logging>
        <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net">
            <!-- choices are INLINE, FILE, FILE-WATCH, EXTERNAL-->
            <!-- otherwise BasicConfigurer.Configure is used   -->
            <!-- log4net configuration file is specified with key configFile-->
            <arg key="configType" value="INLINE" />
            <arg key="configFile" value="filename" />
        </factoryAdapter>
    </logging>
  </common>
  
  <log4net>
    <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%-5level %logger - %message%newline" />
      </layout>
    </appender>

    <!-- Set default logging level to DEBUG -->
    <root>
      <level value="DEBUG" />
      <appender-ref ref="ConsoleAppender" />
    </root>

    <!-- Set logging for Spring.  Logger names in Spring correspond to the namespace -->
    <logger name="Spring">
      <level value="INFO" />
    </logger>
    
    <logger name="Spring.Data">
      <level value="DEBUG" />
    </logger>

    <logger name="NHibernate">
      <level value="INFO" />
    </logger>


  </log4net>
</configuration>
