|
PTLog API - 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Abstraction of logging context information for log service provider.
It is assumed that each instances of this are created for logging subjects(= "who wants to request logging"), and encapsulate management of relation between logging subject and loggability(= whether logging is enabled for it) on each logging type.
In other words,
this is as same as Logger of JDK logging API,
Log4J or Log of Jakarta Commons Logging.
Major difference between this and them is that
this is assumed not to be used directly from logging request code
but to be used internally in Log implementation class.
Log| Method Summary | |
boolean |
enables(LogType type,
java.lang.String method)
Examine whether specified type logging is enabled for specified method. |
java.lang.String |
getSubject(boolean embedded)
Get name of logging request subject. |
void |
log(LogType type,
java.lang.String method,
java.lang.String message,
java.lang.Throwable throwable)
Request logging. |
| Method Detail |
public java.lang.String getSubject(boolean embedded)
This method expects to be invoked from
constructor of .Log
embedded is true,
if returned value is embedded in message
(e.g.: "ENTER subject#doSomething()").
Otherwise, returned value is used to identify logging request issuer.
embedded - whether returned value is embedded in message or not.
public boolean enables(LogType type,
java.lang.String method)
You should assume that:
Invocation const and exactness are trade-off between each other, and such trade-off is implementation decision.
This method is provided for
Log.enables(jp.ne.dti.lares.foozy.ptlog.LogType).
type - of log record.method - from which logging request is invoked.
public void log(LogType type,
java.lang.String method,
java.lang.String message,
java.lang.Throwable throwable)
This method is provided for
Log.log(LogType, String, Throwable).
type - of loggingmethod - from which logging is requestedmessage - of loggingthrowable - of logging
|
PTLog API - 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||