• log4net配置文件


    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
      </configSections>
        <log4net>
        <!--定义输出到文件中-->
        <appender name="LogFileAppender" type="log4net.Appender.FileAppender">
          <!--定义文件存放位置-->
          <file value="D:LogLog.txt" />
          <appendToFile value="true" />
          <rollingStyle value="Date" />
          <datePattern value="yyyyMMdd-HH:mm:ss" />
          <layout type="log4net.Layout.PatternLayout">
            <!--每条日志末尾的文字说明-->
            <footer value="by 查询" />
            <!--输出格式-->
            <!--样例:2008-03-26 13:42:32,111 [10] INFO  Log4NetDemo.MainClass [(null)] - info-->
            <conversionPattern value="%newline记录时间: %date 查询信息描述:%message%newline" />
          </layout>
        </appender>
        <root>
          <!--文件形式记录日志-->
          <appender-ref ref="LogFileAppender" />
        </root>
      </log4net>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <publisherPolicy apply="yes" />
          <probing privatePath="Common" />
        </assemblyBinding>
      </runtime>
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
      </startup>
      <system.web>
        <membership defaultProvider="ClientAuthenticationMembershipProvider">
          <providers>
            <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
          </providers>
        </membership>
        <roleManager defaultProvider="ClientRoleProvider" enabled="true">
          <providers>
            <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
          </providers>
        </roleManager>
      </system.web>
    </configuration>
  • 相关阅读:
    《JAVA高级程序设计》第四周作业
    《JAVA高级程序设计》第三周作业
    《Java高级程序设计》第二周作业
    《Java高级程序设计》第一周作业
    javar日志
    JAVA日志
    JAVA日志
    java日志
    JAVA日志
    JAVA日志
  • 原文地址:https://www.cnblogs.com/yisheng/p/3797129.html
Copyright © 2020-2023  润新知