The FileHandler is able to write to a single file, or write to a rotating set of files as each file reaches a specified maximum size. : 日志 « 日志 « Java 教程

En
Java 教程
1. 语言基础
2. 数据类型
3. 操作符
4. 流程控制
5. 类定义
6. 开发相关
7. 反射
8. 正则表达式
9. 集合
10. 线
11. 文件
12. 泛型
13. 本土化
14. Swing
15. Swing事件
16. 二维图形
17. SWT
18. SWT 二维图形
19. 网络
20. 数据库
21. Hibernate
22. JPA
23. JSP
24. JSTL
25. Servlet
26. Web服务SOA
27. EJB3
28. Spring
29. PDF
30. 电子邮件
31. 基于J2ME
32. J2EE应用
33. XML
34. 设计模式
35. 日志
36. 安全
37. Apache工具
38. 蚂蚁编译
39. JUnit单元测试
Java
Java 教程 » 日志 » 日志 
35. 1. 7. The FileHandler is able to write to a single file, or write to a rotating set of files as each file reaches a specified maximum size.

The next number in a sequence is added to the end of the name of each rotating file, unless a generation (sequence) pattern is specified elsewhere.

The properties for the FileHandler are listed in the following table.

Property NameDescriptionDefault Value
FileHandler.levelLog level for the handler.Level.INFO
FileHandler.filterFilter to use.undefined
FileHandler.formatterFormatter to use.java.util.logging.XMLFormatter
FileHandler.encodingCharacter set encoding to use.Default platform encoding
FileHandler.limitSpecifies approximate maximum number of bytes to write to a file. 0 means no limit.0
FileHandler.countSpecifies how many output files to cycle through.1
FileHandler.patternPattern used to generate output filenames.%h/java%u.log
FileHandler.appendBoolean value specifying whether to append to an existing file or overwrite it.false


35. 1. 日志
35. 1. 1. A full list of levels.
35. 1. 2. 日志方法调用
35. 1. 3. 日志异常
35. 1. 4. The StreamHandler serves chiefly as a base class for all handlers that write log messages to some OutputStream.
35. 1. 5. 写日志ConsoleHandler到System.err 。
35. 1. 6. The SocketHandler writes log messages to the network over a specified TCP port.
35. 1. 7. The FileHandler is able to write to a single file, or write to a rotating set of files as each file reaches a specified maximum size.
35. 1. 8. FileHandler类支持文件模式。
35. 1. 9. MemoryHandler是一个缓冲记忆体中。
35. 1. 10. ErrorManager演示
35. 1. 11. 信息记录
35. 1. 12. 写日志到文件
35. 1. 13. 适当的类和方法名
35. 1. 14. Preventing a Logger from Forwarding Log Records to Its Parent
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.