|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.foundation.NSLog.Logger com.webobjects.foundation.NSLog.PrintStreamLogger
NSLog.PrintStreamLogger is a concrete subclass of NSLog.Logger.
It logs output to a java.io.PrintStream
which is contained by the logger.
This PrintStream
can be changed, which causes the logger to direct log messages somewhere else, such as a local file.
NSLog.PrintStreamLogger provides additional method behavior for verbose logging.
By default, NSLog.out
is an NSLog.PrintStreamLogger that points at System.out
with verbose logging disabled.
NSLog.err
and NSLog.debug
are NSLog.PrintStreamLoggers that point to System.err
with verbose logging enabled.
Verbose logging produces output of the format: [Current Time] <Current Thread Name> output
NSLog
,
NSLog.Logger
Field Summary |
Fields inherited from class com.webobjects.foundation.NSLog.Logger |
debugLevel, isEnabled, isVerbose |
Constructor Summary | |
NSLog.PrintStreamLogger()
Creates a new NSLog.PrintStreamLogger which directs output to System.out . |
|
NSLog.PrintStreamLogger(PrintStream ps)
Creates a new NSLog.PrintStreamLogger which directs output to ps . |
Method Summary | |
void |
appendln()
Invokes println() and flush on printStream , if isEnabled returns true . |
void |
appendln(Object aValue)
Writes the string representation of aValue to printStream , if isEnabled returns true . |
void |
appendln(Throwable aValue)
Writes the stack trace of aValue to printStream , if isEnabled returns true . |
void |
flush()
Invokes flush on printStream . |
PrintStream |
printStream()
Provides the PrintStream wrapped by this NSLog.Logger instance. |
void |
setPrintStream(PrintStream aStream)
Redirects all output for this NSLog.Logger instance to aStream . |
Methods inherited from class com.webobjects.foundation.NSLog.Logger |
allowedDebugLevel, appendln, appendln, appendln, appendln, appendln, appendln, appendln, appendln, appendln, appendln, isEnabled, isVerbose, setAllowedDebugLevel, setIsEnabled, setIsVerbose |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NSLog.PrintStreamLogger()
System.out
.
NSLog.Logger#()
public NSLog.PrintStreamLogger(PrintStream ps)
ps
.
ps
- the PrintSteam
that may accept output
IllegalArgumentException
- if ps
is null
#()
,
NSLog.Logger#()
Method Detail |
public void appendln()
println()
and flush
on printStream
, if isEnabled
returns true
.
appendln
in class NSLog.Logger
NSLog.Logger.isEnabled
,
printStream()
,
NSLog.Logger.appendln()
public void appendln(Throwable aValue)
aValue
to printStream
, if isEnabled
returns true
.
This is overridden here for efficiency.
Prefixes the stack trace if isVerbose
returns true
.
appendln
in class NSLog.Logger
aValue
- the exception to logNSLog.Logger.isEnabled
,
NSLog.Logger.isVerbose
,
printStream()
,
NSLog.Logger.appendln(Throwable)
public void appendln(Object aValue)
aValue
to printStream
, if isEnabled
returns true
.
For example, a generic object passed to this method might output "java.lang.Object@67e5d".
The toString
method of aValue
provides the string representation.
Prefixes the string representation if isVerbose
returns true
.
appendln
in class NSLog.Logger
aValue
- the object to logNSLog.Logger.isEnabled
,
NSLog.Logger.isVerbose
,
printStream()
,
NSLog.Logger.appendln(Object)
public void flush()
flush
on printStream
.
flush
in class NSLog.Logger
NSLog.Logger.flush()
public PrintStream printStream()
PrintStream
wrapped by this NSLog.Logger instance.
java.io.PrintStream
; never null
#()
,
#(java.io.PrintStream)
,
setPrintStream(java.io.PrintStream)
public void setPrintStream(PrintStream aStream)
aStream
.
No change is made if aStream
is null
.
aStream
- the input print streamprintStream()
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |