|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectthings.thinger.kernel.basic.KernelBasic_WriterLogger
public class KernelBasic_WriterLogger
Implements a Writer based logger. It will implement PushDrain in case the Kernel wants to use it as a conduit terminus.
The default Logger.TYPE will be BROADCAST. The default debugging state is off.
Changing the LEVEL through Logger or Debuggable interface will remember the LEVEL before transition. Calling debuggingOff() will restore whatever the remember LEVEL is. So, it is possible it could return it to an unintended state, depending on how you use it.
Version History
EPG - Initial - 10 FEB 06
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface things.thinger.io.Logger |
|---|
Logger.LEVEL, Logger.TYPE |
| Nested classes/interfaces inherited from interface things.thinger.kernel.ResourceInterface |
|---|
ResourceInterface.State |
| Field Summary |
|---|
| Fields inherited from interface things.thinger.kernel.ResourceInterface |
|---|
NULL_ID |
| Constructor Summary | |
|---|---|
KernelBasic_WriterLogger()
|
|
| Method Summary | |
|---|---|
void |
debug(java.lang.String msg)
Log a trivial debug entry. |
void |
debug(java.lang.String msg,
int numeric)
Log a trivial error entry with a numeric. |
void |
debug(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
Log a complex debug entry with numerics and attributes. |
void |
debug(java.lang.String msg,
int numeric,
NVImmutable... attributes)
Log a complex debug entry with numerics and attributes. |
void |
debug(java.lang.String msg,
int numeric,
java.lang.String... attributes)
Log a complex debug entry with numerics and attributes. |
void |
debuggingOff()
Turn debugging off. |
void |
debuggingOn()
Turn debugging on. |
boolean |
debuggingState()
Get the current debugging state. |
void |
disposeResource()
This is how the system tells a resource he is about to be destroyed. |
void |
error(java.lang.String msg)
Log a trivial error entry. |
void |
error(java.lang.String msg,
int numeric)
Log a trivial error entry with a numeric. |
void |
error(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
Log a complex error entry with numerics and attributes. |
void |
error(java.lang.String msg,
int numeric,
NVImmutable... attributes)
Log a complex error entry with numerics and attributes. |
void |
error(java.lang.String msg,
int numeric,
java.lang.String... attributes)
Log a complex error entry with numerics and attributes. |
void |
exception(java.lang.Throwable tr)
Log an exception. |
void |
flush()
Tell the underlying system to flush any entries. |
WhoAmI |
getId()
Get ID of the resource. |
Logger.LEVEL |
getLevel()
This will get the level of entries that will pass. |
ResourceInterface.State |
getState()
Get the current state. |
void |
info(java.lang.String msg)
Log a trivial information entry. |
void |
info(java.lang.String msg,
int numeric)
Log a trivial information entry with a numeric. |
void |
info(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
Log a complex information entry with numerics and attributes. |
void |
info(java.lang.String msg,
int numeric,
NVImmutable... attributes)
Log a complex information entry with numerics and attributes. |
void |
info(java.lang.String msg,
int numeric,
java.lang.String... attributes)
Log a complex info entry with numerics and attributes. |
void |
init(ConduitID yourId)
Initialize the PushDrain. |
void |
init(Logger.TYPE loggerType)
Initialized the logger. |
void |
init(java.io.PrintWriter out,
WhoAmI ownerId,
Logger.LEVEL level)
Initialize the LoggerWriter with a Writer and a prefix ID. |
void |
initResource(WhoAmI id)
Initialize the resource. |
boolean |
lock()
Lock an object. |
void |
post(Entry e)
Post an Entry. |
void |
post(java.lang.String message)
Post as a message. |
void |
postit(java.lang.String message)
Post as a message. |
Receipt |
postListener(Data n)
Listen for a post. |
void |
setLevel(Logger.LEVEL newLevel)
This will set the level of entries that will pass. |
void |
setPostLevel(Logger.LEVEL newLevel)
This will set the default level of StringPoster posted entries. |
void |
shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel)
Shout a log entry with numerics. |
void |
shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel,
java.util.Collection<NVImmutable> attributes)
Shout a log entry with numerics and attributes. |
void |
shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel,
NVImmutable... attributes)
Shout a log entry with numerics and attributes. |
void |
shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel,
java.lang.String... attributes)
Shout a log entry with numerics and attributes. |
void |
shout(java.lang.String msg,
Logger.LEVEL theLevel)
Shout a log entry. |
void |
unlock()
This call is only meaningful if the thread holds the lock. |
void |
warning(java.lang.String msg)
Log a trivial warning entry. |
void |
warning(java.lang.String msg,
int numeric)
Log a trivial warning entry with a numeric. |
void |
warning(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
Log a complex warning entry with numerics and attributes. |
void |
warning(java.lang.String msg,
int numeric,
NVImmutable... attributes)
Log a complex warning entry with numerics and attributes. |
void |
warning(java.lang.String msg,
int numeric,
java.lang.String... attributes)
Log a complex warning entry with numerics and attributes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KernelBasic_WriterLogger()
| Method Detail |
|---|
public void init(java.io.PrintWriter out,
WhoAmI ownerId,
Logger.LEVEL level)
throws SystemException
out - A writer. The implementation doesn't care what kind. If the Logger type is set as reliable, then every write will be flushed.ownerId - Owner id. The TAG will be used only.level - The logging level. Note that the debug methods will override any value passed here.
SystemException
public void post(java.lang.String message)
throws ThingsException
post in interface StringPostermessage - String to post
ThingsExceptionpublic void postit(java.lang.String message)
postit in interface StringPostermessage - String to postpublic void setPostLevel(Logger.LEVEL newLevel)
setPostLevel in interface LoggernewLevel - the new default level.
SystemExceptionpublic void setLevel(Logger.LEVEL newLevel)
setLevel in interface LoggernewLevel - the new level.public Logger.LEVEL getLevel()
getLevel in interface Logger
public void init(ConduitID yourId)
throws SystemException
init in interface PushDrainyourId - The ConduitID for this PushDrain.
SystemExceptionConduitID
public Receipt postListener(Data n)
throws SystemException
postListener in interface PushDrainn - The data to post.
SystemException
public void init(Logger.TYPE loggerType)
throws SystemException
init in interface LoggerloggerType - The type of logger this should be. This is more a request than a demand.
SystemExceptionpublic void debuggingOn()
debuggingOn in interface Debuggablepublic void debuggingOff()
debuggingOff in interface Debuggablepublic boolean debuggingState()
debuggingState in interface Debuggablepublic void flush()
flush in interface StringPosterflush in interface Logger
public void post(Entry e)
throws SystemException
post in interface Loggere - The entry.
SystemExceptionEntry
public void exception(java.lang.Throwable tr)
throws SystemException
exception in interface Loggertr - The Exception.
SystemException
public void error(java.lang.String msg)
throws SystemException
error in interface Loggermsg - The text message.
SystemException
public void error(java.lang.String msg,
int numeric)
throws SystemException
error in interface Loggermsg - The text message.numeric - The numeric.
SystemException
public void error(java.lang.String msg,
int numeric,
NVImmutable... attributes)
throws SystemException
error in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void error(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
throws SystemException
error in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void error(java.lang.String msg,
int numeric,
java.lang.String... attributes)
throws SystemException
error in interface Loggermsg - The text message.numeric - The numeric.attributes - Name/value pairs for attributes. Must be an even number of Strings.
SystemExceptionNV
public void warning(java.lang.String msg)
throws SystemException
warning in interface Loggermsg - The text message.
SystemException
public void warning(java.lang.String msg,
int numeric)
throws SystemException
warning in interface Loggermsg - The text message.numeric - The numeric.
SystemException
public void warning(java.lang.String msg,
int numeric,
NVImmutable... attributes)
throws SystemException
warning in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void warning(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
throws SystemException
warning in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void warning(java.lang.String msg,
int numeric,
java.lang.String... attributes)
throws SystemException
warning in interface Loggermsg - The text message.numeric - The numeric.attributes - Name/value pairs for attributes. Must be an even number of Strings.
SystemException
public void info(java.lang.String msg)
throws SystemException
info in interface Loggermsg - The text message.
SystemException
public void info(java.lang.String msg,
int numeric)
throws SystemException
info in interface Loggermsg - The text message.numeric - The numeric.
SystemException
public void info(java.lang.String msg,
int numeric,
NVImmutable... attributes)
throws SystemException
info in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void info(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
throws SystemException
info in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void info(java.lang.String msg,
int numeric,
java.lang.String... attributes)
throws SystemException
info in interface Loggermsg - The text message.numeric - The numeric.attributes - Name/value pairs for attributes. Must be an even number of Strings.
SystemException
public void debug(java.lang.String msg)
throws SystemException
debug in interface Loggermsg - The text message.
SystemException
public void debug(java.lang.String msg,
int numeric)
throws SystemException
debug in interface Loggermsg - The text message.numeric - The numeric.
SystemException
public void debug(java.lang.String msg,
int numeric,
NVImmutable... attributes)
throws SystemException
debug in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void debug(java.lang.String msg,
int numeric,
java.util.Collection<NVImmutable> attributes)
throws SystemException
debug in interface Loggermsg - The text message.numeric - The numeric.attributes - Sequence of NVs representing attributes.
SystemExceptionNVImmutable
public void debug(java.lang.String msg,
int numeric,
java.lang.String... attributes)
throws SystemException
debug in interface Loggermsg - The text message.numeric - The numeric.attributes - Name/value pairs for attributes. Must be an even number of Strings.
SystemExceptionNV
public void shout(java.lang.String msg,
Logger.LEVEL theLevel)
shout in interface Loggermsg - The text message.theLevel - The level of the message.
public void shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel)
shout in interface Loggermsg - The text message.numeric - The numeric.theLevel - The level of the message.NV
public void shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel,
NVImmutable... attributes)
shout in interface Loggermsg - The text message.numeric - The numeric.theLevel - The level of the message.attributes - Sequence of NVs representing attributes.NVImmutable
public void shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel,
java.util.Collection<NVImmutable> attributes)
shout in interface Loggermsg - The text message.numeric - The numeric.theLevel - The level of the message.attributes - Sequence of NVs representing attributes.NVImmutable
public void shout(java.lang.String msg,
int numeric,
Logger.LEVEL theLevel,
java.lang.String... attributes)
shout in interface Loggermsg - The text message.numeric - The numeric.theLevel - The level of the message.attributes - Name/value pairs for attributes. Must be an even number of Strings.NV
public void initResource(WhoAmI id)
throws SystemException
initResource in interface ResourceInterfaceid - The id of the resource.
SystemExceptionWhoAmI
public void disposeResource()
throws SystemException
disposeResource in interface ResourceInterfaceSystemException
public boolean lock()
throws SystemException
lock in interface ResourceInterfaceSystemException
public void unlock()
throws SystemException
unlock in interface ResourceInterfaceSystemException
public WhoAmI getId()
throws SystemException
getId in interface ResourceInterfaceSystemExceptionWhoAmI
public ResourceInterface.State getState()
throws SystemException
getState in interface ResourceInterfaceSystemException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||