◎筱米加步枪◎.Blog

Happy coding

Log4j将日志输出到文件配置

筱米加步枪 posted @ 2010年7月22日 07:26 in [ 开源框架 ] with tags log4j , 2673 阅读

今天,为了测试速度,很无奈的要去统计委托回报的数量。需要将日志输出到文件来统计。

得yoyo相助,得到如下配置可用:

log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File = D:/output.log   #这里指定文件路径 
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}%l%m%n

另外需要注意

要设置  log4j.rootLogger=DEBUG, file

Kerala 4th Class Sy 说:
2023年9月11日 19:27

SCERT Kerala Elementary Syllabus 2024 is Designed in Accordance with the NCERT Based Guidelines and helps Students to get an Overview of the Malayalam, English Medium All Subject, Kerala keeps a 4th Class Exam Pattern with the aim to Provide a Quality Education for All Students, On the basis of the Current Educational Demands.Students Should Download the Respective Stream wise Kerala Class Kerala 4th Class Syllabus 2024 Exam Syllabus 2024 Subjects of Malayalam, English, Mathematics, EVS Pdf Format Provide Check the same From our page here,So Students need to Start Their Preparation by first Downloading the Stream wise Kerala Curriculum Syllabus 2024 Latest Edition.

Kerala 4th Class Sy 说:
2023年9月11日 19:28

SCERT Kerala Elementary Syllabus 2024 is Designed in Accordance with the NCERT Based Guidelines and helps Students to get an Overview of the Malayalam, English Medium All Subject, Kerala keeps a 4th Class Exam Pattern with the aim to Provide a Quality Education for All Students, On the basis of the Current Educational Demands.Students Should Download the Respective Stream wise Kerala Class Kerala 4th Class Syllabus 2024 Exam Syllabus 2024 Subjects of Malayalam, English, Mathematics, EVS Pdf Format Provide Check the same From our page here,So Students need to Start Their Preparation by first Downloading the Stream wise Kerala Curriculum Syllabus 2024 Latest Edition.

civaget 说:
2023年12月12日 09:40

백링크업체's SEO audits are worth every penny. They provided actionable insights and recommendations.

civaget 说:
2023年12月17日 03:42

대밤's future plans promise to enhance the late-night culture of Daegu, ensuring it remains a dynamic and evolving platform.

civaget 说:
2023年12月19日 05:38

When I originally commented I clicked the -Notify me when new surveys are added- checkbox and today every time a comment is added I purchase four emails with similar comment. Perhaps there is however you possibly can get rid of me from that service? Thanks! 유튜브 프리미엄 무료보기

civaget 说:
2023年12月23日 02:12

Dive into 해외스포츠중계 and celebrate the unity of sports worldwide.

civaget 说:
2023年12月27日 01:28

오피스타 makes finding nearby massage parlors effortless. It's a user-friendly solution.

civaget 说:
2023年12月28日 03:31

진주휴게텔 never disappoints. The professional therapists and peaceful ambiance create a blissful retreat. My preferred spot for rejuvenation.

civaget 说:
2023年12月31日 03:11

누누티비 다시보기's high-quality streaming never disappoints. Buffering? Not here!


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter