|
OOP MimeParser Version 3.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface GenericLogger
Interface for logging. The implementation of this interface will be used within
Java API by OOP-Research.
Apache Common Logging API
implements the sophisticated interface for logging, and allows the Java developers
to choose their favorite underlying logging API, such as Java Logging in JDK 1.4
or Log4J.
But, there may be a case that the Java developers cannot depend on
Apache Common Logging API.
In that case, Java Logging in JDK 1.4 will be the only choice.
To be ready for it, Java APIs by OOP-Research write the log records through this
interface.
There are 2 implementations of this interface:
Logger4Jdk for Java Logging in JDKLogger4Jcl for Apache Common Logging
import org.apache.commons.logging.Log;
// If you use Apache Common Logging
private Log log=...
// Java API by OOP-Research
private MailScheduler mail=...
// Write the record from your application.
log.warn("Something is strange ...");
// Wrap Apache Common Logging by this interface.
GenericLogger gen=new Logger4Jcl(log);
// Pass this interface to MailScheduler.
mail.setLogger(gen);
By the above code fragment, MailScheduler (one of Java APIs by OOP-Research)
writes the its own records into Apache Common Logging, along with the records from
the application.
| Method Summary | |
|---|---|
void |
log(java.util.logging.Level level,
java.lang.String sourceClass,
java.lang.String sourceMethod,
java.lang.String msg)
Log a message, specifying source class and method. |
void |
log(java.util.logging.Level level,
java.lang.String sourceClass,
java.lang.String sourceMethod,
java.lang.String msg,
java.lang.Throwable thrown)
Log a message, specifying source class and method, with associated Throwable information. |
| Method Detail |
|---|
void log(java.util.logging.Level level,
java.lang.String sourceClass,
java.lang.String sourceMethod,
java.lang.String msg)
level - One of the message level identifiers, e.g. SEVEREsourceClass - name of class that issued the logging requestsourceMethod - name of method that issued the logging requestmsg - The string message
void log(java.util.logging.Level level,
java.lang.String sourceClass,
java.lang.String sourceMethod,
java.lang.String msg,
java.lang.Throwable thrown)
level - One of the message level identifiers, e.g. SEVEREsourceClass - name of class that issued the logging requestsourceMethod - name of method that issued the logging requestmsg - The string messagethrown - Throwable associated with log message
|
OOP MimeParser Version 3.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.