public class NamingUtils extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
debug
Debug flag which must be true for debug streams to be created and
dprint output to be generated.
|
static PrintStream |
debugStream
The debug printstream.
|
static PrintStream |
errStream
The error printstream.
|
Modifier and Type | Method and Description |
---|---|
static void |
dprint(String msg)
Prints the message to the debug stream if debugging is enabled.
|
static void |
errprint(String msg)
Prints the message to the error stream (System.err is default).
|
static void |
makeDebugStream(File logFile)
Create a debug print stream to the supplied log file.
|
static void |
makeErrStream(File errFile)
Create a error print stream to the supplied file.
|
static void |
printException(Exception e)
Prints the stacktrace of the supplied exception to the error stream.
|
public static boolean debug
public static PrintStream debugStream
public static PrintStream errStream
public static void dprint(String msg)
msg
- the debug message to print.public static void errprint(String msg)
msg
- the error message to print.public static void printException(Exception e)
e
- any Java exception.public static void makeDebugStream(File logFile) throws IOException
logFile
- the file to which debug output will go.IOException
- thrown if the file cannot be opened for output.public static void makeErrStream(File errFile) throws IOException
logFile
- the file to which error messages will go.IOException
- thrown if the file cannot be opened for output.Copyright © 2016 JBoss by Red Hat. All rights reserved.