TestEnv (Java Globus API)
org.globus.ftp.test
Class TestEnv
java.lang.Object
|
+--org.globus.ftp.test.TestEnv
public class TestEnv extends java.lang.Object
Utility for tests. This class has two functions. First, it
holds in public variables the test properties. Second, it
supplies simplified syntax for setting the values for
class loggers.
Method Summary
static org.apache.log4j.Level
getLogLevel (java.lang.Class aClass)
static org.apache.log4j.Level
getLogLevel (java.lang.String loggerName)
static org.apache.log4j.Level
initLogLevel (java.lang.Class aClass,
org.apache.log4j.Level level)
set the given log level only if yet unset, otherwise
do nothing.
static org.apache.log4j.Level
initLogLevel (java.lang.String loggerName,
org.apache.log4j.Level level)
set the given log level only if yet unset, otherwise
do nothing.
static void
setDefaultLogLevel (java.lang.Object main)
Set default log level, which is Level.WARN for all classes
except the class of the main object, which is set to Level.INFO.
static void
setLogLevel (java.lang.Class aClass,
org.apache.log4j.Level level)
Set this class's logger to the given level.
static void
setLogLevel (java.lang.String loggerName,
org.apache.log4j.Level level)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logger
public static org.apache.log4j.Logger logger
This logger can be used anywhere in the application.
UNDEFINED
public static final int UNDEFINED
See Also: Constant Field Values
localDestDir
public static java.lang.String localDestDir
localSrcDir
public static java.lang.String localSrcDir
localSrcFile
public static java.lang.String localSrcFile
localServerPort
public static int localServerPort
serverAHost
public static java.lang.String serverAHost
serverAPort
public static int serverAPort
serverADir
public static java.lang.String serverADir
serverAFile
public static java.lang.String serverAFile
serverAFileSize
public static int serverAFileSize
serverALargeFile
public static java.lang.String serverALargeFile
serverASmallFile
public static java.lang.String serverASmallFile
serverANoSuchFile
public static java.lang.String serverANoSuchFile
serverANoSuchPort
public static int serverANoSuchPort
serverBHost
public static java.lang.String serverBHost
serverBPort
public static int serverBPort
serverBDir
public static java.lang.String serverBDir
serverBFile
public static java.lang.String serverBFile
serverBNoSuchDir
public static java.lang.String serverBNoSuchDir
noSuchServer
public static java.lang.String noSuchServer
serverFHost
public static java.lang.String serverFHost
serverFPort
public static int serverFPort
serverFDir
public static java.lang.String serverFDir
serverFFile
public static java.lang.String serverFFile
serverFFileSize
public static int serverFFileSize
serverFUser
public static java.lang.String serverFUser
serverFPassword
public static java.lang.String serverFPassword
serverFNoSuchFile
public static java.lang.String serverFNoSuchFile
serverFNoSuchPort
public static int serverFNoSuchPort
serverGHost
public static java.lang.String serverGHost
serverGPort
public static int serverGPort
serverGDir
public static java.lang.String serverGDir
serverGFile
public static java.lang.String serverGFile
serverGUser
public static java.lang.String serverGUser
serverGPassword
public static java.lang.String serverGPassword
serverGNoSuchDir
public static java.lang.String serverGNoSuchDir
parallelism
public static int parallelism
fileSeparator
public static java.lang.String fileSeparator
nl
public static java.lang.String nl
CONFIG
public static final java.lang.String CONFIG
See Also: Constant Field Values
globusRootLogger
public static java.lang.String globusRootLogger
TestEnv
public TestEnv ()
setDefaultLogLevel
public static void setDefaultLogLevel (java.lang.Object main)
Set default log level, which is Level.WARN for all classes
except the class of the main object, which is set to Level.INFO.
setLogLevel
public static void setLogLevel (java.lang.Class aClass,
org.apache.log4j.Level level)
Set this class's logger to the given level.
It's an utility.
Instead of saying:
Logger.getLogger(org.globus.ftp.GridFTPClient.class.getName()).\
setLevel((Level)Level.DEBUG);
you can use:
TestEnv.setLogLevel(GridFTPClient.class, Level.DEBUG);
setLogLevel
public static void setLogLevel (java.lang.String loggerName,
org.apache.log4j.Level level)
initLogLevel
public static org.apache.log4j.Level initLogLevel (java.lang.Class aClass,
org.apache.log4j.Level level)
set the given log level only if yet unset, otherwise
do nothing.
initLogLevel
public static org.apache.log4j.Level initLogLevel (java.lang.String loggerName,
org.apache.log4j.Level level)
set the given log level only if yet unset, otherwise
do nothing.
getLogLevel
public static org.apache.log4j.Level getLogLevel (java.lang.Class aClass)
Returns: log level of the given class's logger
getLogLevel
public static org.apache.log4j.Level getLogLevel (java.lang.String loggerName)
Returns: log level of the given logger