diff options
Diffstat (limited to 'src/main/java/bjc/everge/LogStream.java')
| -rw-r--r-- | src/main/java/bjc/everge/LogStream.java | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/main/java/bjc/everge/LogStream.java b/src/main/java/bjc/everge/LogStream.java index ef35d9b..fe37d21 100644 --- a/src/main/java/bjc/everge/LogStream.java +++ b/src/main/java/bjc/everge/LogStream.java @@ -46,7 +46,7 @@ public class LogStream { private int verbosity; private PrintStream output; - + /** * Create a new log stream. * @@ -75,6 +75,33 @@ public class LogStream { } /** + * Create a new log stream. + * + * Defaults to printing only fatal errors. + * + * @param out + * The output stream to place things into. + */ + public LogStream(OutputStream out) { + output = new PrintStream(out); + verbosity = FATAL; + } + + /** + * Create a new log stream. + * + * @param out + * The output stream to place things into. + * @param level + * The verbosity level. Use the constants in this class for the + * values. + */ + public LogStream(OutputStream out, int level) { + output = new PrintStream(out); + verbosity = level; + } + + /** * Get the verbosity of the stream. * * @return The verbosity of the stream. |
