JavaTM 2 Platform
Standard Ed. 6

类 java.util.logging.Formatter
的使用

使用 Formatter 的软件包
java.util.logging 提供 JavaTM 2 平台核心日志工具的类和接口。 
 

java.util.logging 中 Formatter 的使用
 

java.util.logging 中 Formatter 的子类
 class SimpleFormatter
          以可读格式输出 LogRecord 的简单摘要。
 class XMLFormatter
          将 LogRecord 格式化为标准 XML 格式。
 

返回 Formatter 的 java.util.logging 中的方法
 Formatter Handler.getFormatter()
          返回该 Handler 的 Formatter。
 

参数类型为 Formatter 的 java.util.logging 中的方法
 void Handler.setFormatter(Formatter newFormatter)
          设置 Formatter。
 

参数类型为 Formatter 的 java.util.logging 中的构造方法
StreamHandler(OutputStream out, Formatter formatter)
          创建带给定 Formatter 和输出流的 StreamHandler。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only。