• [转]log4c 配置文件的用法


    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE log4c SYSTEM "">
    <log4c version="1.2.1">
        <config>
            <bufsize>0</bufsize>
            <debug level="2"/>
            <nocleanup>0</nocleanup>
            <reread>1</reread>
        </config>
     
        <category name="root" priority="notice"/>
          <category name="linuxany.com" priority="debug" appender="stderr" />
        <category name="log4ctest" priority="debug" appender="myrollingfileappender" />
        
        <rollingpolicy name="myrollingpolicy" type="sizewin" maxsize="104857600" maxnum="10" />    
            <!--sizewin 表示达到最大值后新建日志文件  值由maxsize设定
                maxnum  最大文件数目 
             -->
     
        <appender name="myrollingfileappender" type="rollingfile" logdir="./" prefix="mylogfile" layout="dated" rollingpolicy="myrollingpolicy" />
           <!--logdir 日志输出路径
               prefix  文件名
               layout 输出格式 (与下方layout对应)
                  例如dated为:
                      20110727 09:21:10.167 WARN     log4ctest- [    main.c][  57][      main()]: shit!-99947
                      20110727 09:21:10.167 WARN     log4ctest- [    main.c][  57][      main()]: shit!-99948
                      20110727 09:21:10.167 WARN     log4ctest- [    main.c][  57][      main()]: shit!-99949
                  basic为:
                      WARN     log4ctest - [    main.c][  57][      main()]: shit!-99982
                      WARN     log4ctest - [    main.c][  57][      main()]: shit!-99983
                      WARN     log4ctest - [    main.c][  57][      main()]: shit!-99984
                      WARN     log4ctest - [    main.c][  57][      main()]: shit!-99985              
    
            -->
        <appender name="stdout" type="stream" layout="basic"/>
        <appender name="stderr" type="stream" layout="dated"/>
        <appender name="syslog" type="syslog" layout="basic"/>
        <appender name="s13file" type="s13_file" layout="basic"/>
        <appender name="plain_stderr" type="s13_stderr" layout="none"/>
        <appender name="cat_stderr" type="s13_stderr" layout="catlayout"/>
        <appender name="xml_stderr" type="s13_stderr" layout="xmllayout"/>
        <appender name="user_stderr" type="s13_stderr" layout="userlayout"/>
     
        <layout name="basic" type="basic"/>
        <layout name="dated" type="dated"/>
        <layout name="catlayout" type="s13_cat"/>
        <layout name="xmllayout" type="s13_xml"/>
        <layout name="none" type="s13_none"/>
        <layout name="userlayout" type="s13_userloc"/>
     
    </log4c>
  • 相关阅读:
    All about Python
    All about TestComplete
    All about Ranorex
    围观大神们的博客
    CRP实施方法论(转)
    启发式测试策略模型(Heuristic Test Strategy Model,简称HTSM)(转)
    soapUI学习笔记---断言的小使用(转)
    soapUI学习笔记--用例字段参数化(转)
    常用功能测试点汇总(转)
    记一次性能测试实践1
  • 原文地址:https://www.cnblogs.com/weinyzhou/p/4983524.html
Copyright © 2020-2023  润新知