|
WebObjects 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.foundation.NSLog.Logger
NSLog.Logger is an abstract class that specifies the core functionality for NSLog.
You can subclass NSLog.Logger to add custom logging implementations based
on Email, java.io.PrintWriters, display to a Swing window, etc. To add
custom logging implementations based on java.io.PrintStream, subclass
NSLog.PrintStreamLogger. If you subclass NSLog.Logger, you need only
implement two of the appendln
methods: appendln(Object)
,
and appendln()
, since the other appendln
methods invoke appendln(Object)
and appendln()
. You must also implement flush()
if you subclass.
NSLog
,
NSLog.PrintStreamLogger
Constructor Summary | |
NSLog.Logger()
The default constructor for Logger does nothing. |
Method Summary | |
abstract void |
appendln()
Since this is an abstract method, it does nothing by default. |
void |
appendln(boolean aValue)
Calls appendln(Object anObject) , passing Boolean.TRUE if aValue
is true , or
Boolean.FALSE if aValue is false . |
void |
appendln(byte aValue)
Calls appendln(Object anObject) , by transforming aValue into a Java
Byte class object. |
void |
appendln(byte[] aValue)
Calls appendln(Object anObject) , by transforming aValue into a
Java String class object, using the default encoding. |
void |
appendln(char aValue)
Calls appendln(Object anObject) , by transforming aValue into a
Java String class object. |
void |
appendln(char[] aValue)
Calls appendln(Object anObject) , by transforming aValue into a
Java String class object. |
void |
appendln(double aValue)
Calls appendln(Object anObject) , by transforming aValue into a
Java Double class object. |
void |
appendln(float aValue)
Calls appendln(Object anObject) by transforming aValue into a Java
Float class object. |
void |
appendln(int aValue)
Calls appendln(Object anObject) , by transforming aValue into a Java
Integer class object. |
void |
appendln(long aValue)
Calls appendln(Object anObject) , by transforming aValue into a Java
Long class object. |
abstract void |
appendln(Object aValue)
Since this is an abstract method, it does nothing by default. |
void |
appendln(short aValue)
Calls appendln(Object anObject) , by transforming aValue into a Java
Short class object. |
void |
appendln(Throwable aValue)
Calls appendln(Object anObject) with NSLog.throwableAsString(aValue)
as an argument. |
abstract void |
flush()
Since this is an abstract method, it does nothing by default. |
boolean |
isEnabled()
As implemented in NSLog, the internal boolean regulates whether logging is enabled or disabled. |
boolean |
isVerbose()
As implemented in NSLog, the internal boolean regulates whether verbose logging is activated or deactivated. |
void |
setIsEnabled(boolean aBool)
Sets the value of an internal boolean to aBool . |
void |
setIsVerbose(boolean aBool)
Sets the value of an internal boolean to aBool . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NSLog.Logger()
Method Detail |
public void appendln(boolean aValue)
appendln(Object anObject)
, passing Boolean.TRUE
if aValue
is true
, or
Boolean.FALSE
if aValue
is false
.aValue
- boolean value to append to outputpublic void appendln(byte aValue)
appendln(Object anObject)
, by transforming aValue
into a Java
Byte class object.aValue
- byte value to append to outputpublic void appendln(byte[] aValue)
appendln(Object anObject)
, by transforming aValue
into a
Java String class object, using the default encoding.aValue
- byte array to append to outputpublic void appendln(char aValue)
appendln(Object anObject)
, by transforming aValue
into a
Java String class object.aValue
- char value to append to outputpublic void appendln(char[] aValue)
appendln(Object anObject)
, by transforming aValue
into a
Java String class object.aValue
- char array to append to outputpublic void appendln(double aValue)
appendln(Object anObject)
, by transforming aValue
into a
Java Double class object.aValue
- double value to append to outputpublic void appendln(float aValue)
appendln(Object anObject)
by transforming aValue
into a Java
Float class object.aValue
- float value to append to outputpublic void appendln(int aValue)
appendln(Object anObject)
, by transforming aValue
into a Java
Integer class object.aValue
- int value to append to outputpublic void appendln(long aValue)
appendln(Object anObject)
, by transforming aValue
into a Java
Long class object.aValue
- long value to append to outputpublic void appendln(short aValue)
appendln(Object anObject)
, by transforming aValue
into a Java
Short class object.aValue
- short value to append to outputpublic void appendln(Throwable aValue)
appendln(Object anObject)
with NSLog.throwableAsString(aValue)
as an argument.aValue
- the Throwable object to append to outputpublic abstract void appendln(Object aValue)
synchronized
or
otherwise be designed to be thread-safe.aValue
- the object to be appended to the outputpublic abstract void appendln()
public abstract void flush()
public boolean isEnabled()
appendln
. By default, logging is enabled. Note that
it is up to subclass implementations to pay attention to this setting, NSLogger
does nothing but maintain state in an instance variable.true
, and is set by setIsEnabled
setIsEnabled(boolean aBool)
public boolean isVerbose()
true
, and is set by setIsVerbose
setIsVerbose(boolean aBool)
public void setIsEnabled(boolean aBool)
aBool
.
As implemented in NSLog, the internal boolean disables logging
if aBool
is false
. When logging is disabled,
the receiver ignores all invocations of
appendln. By default, logging is enabled.aBool
- true
if logging is to be done else false
isEnabled()
public void setIsVerbose(boolean aBool)
aBool
.
As implemented in NSLog, the internal boolean enables verbose
logging if aBool
is true
. By default, verbose
logging is enabled in NSLog.aBool
- true
if verbose logging is to be done else false
isVerbose()
|
Last updated Fri Feb 21 13:15:00 PST 2003. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |