Globus uses the log4j library to resolve debugging issues.
Instructions:
Example: Service program file is myclass.java
Package com.mycom.myclass;
// introduce log4J corresponding class
Import org.apache.commons.logging.log;
Import org.apache.commons.logging.logfactory;
...................
Class myclass {
// Define a static member variable in MyClass
Private static log logger = logfactory.getlog (myclass.class);
// The then you can add log.
Public showlog () {
Logger.debug ("My Log!");
}
}
Log4j level is low to high as Debug, Info, Warn, Error, Fatal. Debugging procedures can generally use Debug. Log4j's official document address is
Http://logging.apache.org/log4j/docs/Documentation.html
Finally, add classes in the log4j profile of Globus Container, so that the debug information is available, which is slightly different in GT3 and GT4 (just specified).
GT3:
In $ globus_location / ogsilogging.properties
Joining
com.mycom.myclass = console, debug
GT4:
In $ GLOBUS_LOCATION / Container-log4j.properties
Joining
Log4j.category.com.mycom.myclass = debug
Restart the globus container so that the log4j profile takes effect.