<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework"
      type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
      requirePermission="false"/>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <appSettings>
    <!--请在该网站申请百度翻译服务，并填写分配的值 https://fanyi.baidu.com/ -->
    <add key="Baidu.AppId" value=""/>
    <add key="Baidu.PrivateKey" value=""/>
  </appSettings>
  <entityFramework>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
    </providers>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0"/>
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
  <connectionStrings>
    <add name="EfContext" connectionString="Data Source=UserVocabulary.db3" providerName="System.Data.SQLite.EF6"/>
  </connectionStrings>
  
  <log4net>
    <appender name="TraceAppender" type="log4net.Appender.DebugAppender">
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d{H:mm:ss} [%t] %-5p [%c#%M] - %m%n"/>
      </layout>
    </appender>
    <appender name="ErrorRollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="Error.log"/>
      <appendToFile value="true"/>
      <rollingStyle value="Size"/>
      <maxSizeRollBackups value="20"/>
      <maximumFileSize value="10000KB"/>
      <staticLogFileName value="true"/>
      <threshold value="WARN"/>
      <filter type="log4net.Filter.LevelRangeFilter">
        <levelMin value="WARN"/>
        <levelMax value="ERROR"/>
      </filter>
      <preserveLogFileNameExtension value="true"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p [%c#%M] - %m%n"/>
      </layout>
    </appender>
    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="Normal.log"/>
      <appendToFile value="true"/>
      <rollingStyle value="Size"/>
      <maxSizeRollBackups value="20"/>
      <maximumFileSize value="10000KB"/>
      <staticLogFileName value="true"/>
      <preserveLogFileNameExtension value="true"/>
      <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p [%c#%M] - %m%n"/>
      </layout>
    </appender>
    <appender name="SqlFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="Sql.log"/>
      <appendToFile value="true"/>
      <rollingStyle value="Size"/>
      <maxSizeRollBackups value="20"/>
      <maximumFileSize value="10000KB"/>
      <staticLogFileName value="true"/>
      <preserveLogFileNameExtension value="true"/>
      <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d{yyyy-MM-dd HH:mm:ss} [%t] %-5p [%c#%M] - %m%n"/>
      </layout>
    </appender>
    <root>
      <level value="DEBUG"/>
      <appender-ref ref="RollingFileAppender"/>
      <appender-ref ref="TraceAppender"/>
      <appender-ref ref="ErrorRollingFileAppender"/>
    </root>
    <logger name="Entity Framework" additivity="true">
      <level value="DEBUG"/>
      <appender-ref ref="SqlFileAppender"/>
    </logger>
  </log4net>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
<system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite.EF6"/>
      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6"
          description=".NET Framework Data Provider for SQLite (Entity Framework 6)"
          type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
    </DbProviderFactories>
  </system.data></configuration>