java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
org.codelibs.jcifs.smb1.util.LogStream
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
0 - nothing
1 - critical [default]
2 - basic info can be logged under load
3 - almost everything
N - debugging
-
Field Summary
FieldsFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionLogStream(PrintStream stream) Constructs a LogStream with the specified output stream. -
Method Summary
Modifier and TypeMethodDescriptionstatic LogStreamReturns the singleton LogStream instance.static voidsetInstance(PrintStream stream) This must be called beforegetInstanceis called or it will have no effect.static voidsetLevel(int level) Sets the logging level.Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, writeBytesMethods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
level
public static int levelThe current logging level.
-
-
Constructor Details
-
LogStream
Constructs a LogStream with the specified output stream.- Parameters:
stream- the output stream for logging
-
-
Method Details
-
setLevel
public static void setLevel(int level) Sets the logging level.- Parameters:
level- the logging level to set
-
setInstance
This must be called beforegetInstanceis called or it will have no effect.- Parameters:
stream- the PrintStream to use for logging
-
getInstance
Returns the singleton LogStream instance.- Returns:
- the LogStream instance
-