Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


Formatterjava.util.logging

Java 1.4

A Formatter object is
used by a Handler to convert a
LogRecord to a String prior to logging it. Most
applications can simply use one one of the pre-defined concrete
subclasses: SimpleFormatter or
XMLFormatter. Applications requiring custom
formatting of log messages will need to subclass this class and
define the format( ) method to perform the desired
conversion. Such subclasses may find the formatMessage(
) method useful: it performs localization using
java.util.ResourceBundle and formatting using the
facilities of the java.text package.
getHead( ) and getTail( )
return a prefix and suffix (such as opening and closing XML tags) for
a log file.

public abstract class

Formatter {
// Protected Constructors
protected

Formatter ( );
// Public Instance Methods
public abstract String

format (LogRecord

record );
public String

formatMessage (LogRecord

record ); synchronized
public String

getHead (Handler

h );
public String

getTail (Handler

h );
}


Subclasses


SimpleFormatter, XMLFormatter

Passed To


Handler.setFormatter( ),
StreamHandler.StreamHandler( )

Returned By


Handler.getFormatter( )


    / 1191