|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--java.io.FilterOutputStream | +--java.io.PrintStream | +--com.compoze.util.log.LogStream
This class is a PrintStream
that's used for logging and
debugging. The date and current thread are printed with each line, and a
debug and log level are allowed to limit the number of messages.
Inner Class Summary | |
class |
LogStream.ForceLevelStream
This class provides a wrapping print stream which forces the error level to a given value. |
Fields inherited from class java.io.FilterOutputStream |
out |
Fields inherited from interface com.compoze.util.log.ILogLevel |
DEBUG, DISABLED, ERROR, INFO, WARNING |
Constructor Summary | |
LogStream(java.io.OutputStream os)
Constructor. |
|
LogStream(java.io.OutputStream os,
boolean bAutoFlush)
Constructor. |
Method Summary | |
void |
dumpStack()
Dumps the current thread stack at debug level. |
void |
dumpStack(int iLevel)
Dumps the current thread stack. |
int |
getDefaultLevel()
Gets the default level used for messages without a level specified. |
java.lang.String |
getIdentifier()
Gets the identifier printed in the log prefix. |
int |
getLevel()
Gets the log level. |
java.lang.String |
getPrefix(int iLevel)
Gets the prefix used for each line in the debug output. |
void |
print(boolean b)
Prints a boolean. |
void |
print(boolean b,
int iLevel)
Prints a boolean. |
void |
print(char c)
Prints a character. |
void |
print(double d)
Prints a double. |
void |
print(float f)
Prints a float. |
void |
print(int i)
Prints an integer and terminates the line. |
void |
print(int iLevel,
char c)
Prints a character. |
void |
print(int iLevel,
double d)
Prints a double. |
void |
print(int iLevel,
float f)
Prints a float. |
void |
print(int iLevel,
int i)
Prints an integer and terminates the line. |
void |
print(int iLevel,
long l)
Prints a long. |
void |
print(int iLevel,
java.lang.Object o)
Prints an object. |
void |
print(int iLevel,
short s)
Prints a short. |
void |
print(int iLevel,
java.lang.String s)
Prints a string. |
void |
print(long l)
Prints a long. |
void |
print(java.lang.Object o)
Prints an object. |
void |
print(short s)
Prints a short. |
void |
print(java.lang.String s)
Prints a string. |
void |
printDebug(java.lang.String s)
Prints a debug string and terminates the line. |
void |
printError(java.lang.String s)
Prints an error string and terminates the line. |
void |
printInfo(java.lang.String s)
Prints an informational string and terminates the line. |
void |
println(boolean b)
Prints a boolean and terminate the line. |
void |
println(char c)
Prints a character and terminate the line. |
void |
println(double d)
Prints a double and terminate the line. |
void |
println(float f)
Prints a float and terminates the line. |
void |
println(int i)
Prints an integer and terminates the line. |
void |
println(int iLevel,
boolean b)
Prints a boolean and terminate the line. |
void |
println(int iLevel,
char c)
Prints a character and terminate the line. |
void |
println(int iLevel,
double d)
Prints a double and terminate the line. |
void |
println(int iLevel,
float f)
Prints a float and terminates the line. |
void |
println(int iLevel,
int i)
Prints an integer and terminates the line. |
void |
println(int iLevel,
long l)
Prints a long and terminates the line. |
void |
println(int iLevel,
java.lang.Object o)
Prints an object and terminates the line. |
void |
println(int iLevel,
short s)
Prints a short and terminate the line. |
void |
println(int iLevel,
java.lang.String s)
Prints a string and terminates the line. |
void |
println(long l)
Prints a long and terminates the line. |
void |
println(java.lang.Object o)
Prints a double and terminates the line. |
void |
println(short s)
Prints a short and terminate the line. |
void |
println(java.lang.String s)
Prints a string and terminates the line. |
void |
printStackTrace(int iLevel,
java.lang.Throwable t)
Prints a stack trace. |
void |
printStackTrace(java.lang.Throwable t)
Prints a stack trace. |
void |
printWarning(java.lang.String s)
Prints a warning string and terminates the line. |
void |
setDefaultLevel(int iDefaultLevel)
Sets the default level used for messages without a level specified. |
void |
setIdentifier(java.lang.String sIdentifier)
Sets the identifier printed in the log prefix. |
void |
setLevel(int iLogLevel)
Sets the log level. |
Methods inherited from class java.io.PrintStream |
checkError, close, flush, print, println, println, setError, write, write |
Methods inherited from class java.io.FilterOutputStream |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogStream(java.io.OutputStream os)
os
- underlying OutputStreampublic LogStream(java.io.OutputStream os, boolean bAutoFlush)
os
- underlying OutputStreambAutoFlush
- if true, flush at end of every lineMethod Detail |
public void println(boolean b)
println
in class java.io.PrintStream
b
- boolean to printpublic void println(int iLevel, boolean b)
iLevel
- log level to useb
- boolean to printpublic void print(boolean b)
print
in class java.io.PrintStream
b
- boolean to printpublic void print(boolean b, int iLevel)
b
- boolean to printiLevel
- log level to usepublic void println(char c)
println
in class java.io.PrintStream
c
- char to printpublic void println(int iLevel, char c)
iLevel
- log level to usec
- char to printpublic void print(char c)
print
in class java.io.PrintStream
c
- char to printpublic void print(int iLevel, char c)
iLevel
- log level to usec
- char to printpublic void println(short s)
s
- short to printpublic void println(int iLevel, short s)
iLevel
- log level to uses
- short to printpublic void print(short s)
s
- short to printpublic void print(int iLevel, short s)
iLevel
- log level to uses
- short to printpublic void println(int i)
println
in class java.io.PrintStream
int
- int to printpublic void println(int iLevel, int i)
iLevel
- log level to useint
- int to printpublic void print(int i)
print
in class java.io.PrintStream
int
- int to printpublic void print(int iLevel, int i)
iLevel
- log level to useint
- int to printpublic void println(long l)
println
in class java.io.PrintStream
l
- long to printpublic void println(int iLevel, long l)
iLevel
- log level to usel
- long to printpublic void print(long l)
print
in class java.io.PrintStream
l
- long to printpublic void print(int iLevel, long l)
iLevel
- log level to usel
- long to printpublic void println(float f)
println
in class java.io.PrintStream
f
- float to printpublic void println(int iLevel, float f)
iLevel
- log level to usef
- float to printpublic void print(float f)
print
in class java.io.PrintStream
f
- float to printpublic void print(int iLevel, float f)
iLevel
- log level to usef
- float to printpublic void println(double d)
println
in class java.io.PrintStream
d
- double to printpublic void println(int iLevel, double d)
iLevel
- log level to used
- double to printpublic void print(double d)
print
in class java.io.PrintStream
d
- double to printpublic void print(int iLevel, double d)
iLevel
- log level to used
- double to printpublic void println(java.lang.Object o)
println
in class java.io.PrintStream
o
- Object to printpublic void println(int iLevel, java.lang.Object o)
iLevel
- log level to useo
- Object to printpublic void print(java.lang.Object o)
print
in class java.io.PrintStream
o
- Object to printpublic void print(int iLevel, java.lang.Object o)
iLevel
- log level to useo
- Object to printpublic void println(java.lang.String s)
println
in class java.io.PrintStream
s
- String to printiLevel
- log level to usepublic void println(int iLevel, java.lang.String s)
iLevel
- log level to uses
- String to printpublic void printError(java.lang.String s)
s
- the string to printpublic void printWarning(java.lang.String s)
s
- the string to printpublic void printInfo(java.lang.String s)
s
- the string to printpublic void printDebug(java.lang.String s)
s
- the string to printpublic void print(java.lang.String s)
print
in class java.io.PrintStream
s
- the string to printpublic void print(int iLevel, java.lang.String s)
iLevel
- log level to uses
- the string to printpublic void printStackTrace(java.lang.Throwable t)
t
- the Throwable to print the stack trace ofpublic void printStackTrace(int iLevel, java.lang.Throwable t)
iLevel
- the log levelt
- the Throwable to print the stack trace ofpublic void dumpStack(int iLevel)
iLevel
- log level to usepublic void dumpStack()
public java.lang.String getPrefix(int iLevel)
iLevel
- public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String sIdentifier)
sIdentifier
- the identifierpublic void setLevel(int iLogLevel)
iLogLevel
- the logging levelpublic int getLevel()
public void setDefaultLevel(int iDefaultLevel)
iDefaultLevel
- the default logging level for messagespublic int getDefaultLevel()
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |