本文整理匯總了Java中org.jfree.util.Log.isDebugEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java Log.isDebugEnabled方法的具體用法?Java Log.isDebugEnabled怎麽用?Java Log.isDebugEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.util.Log
的用法示例。
在下文中一共展示了Log.isDebugEnabled方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: configure
import org.jfree.util.Log; //導入方法依賴的package包/類
/**
* Configures the module and raises the state to STATE_CONFIGURED if the
* module is not yet configured.
*
* @param subSystem the sub-system.
*
* @return true, if the module was configured, false otherwise.
*/
public boolean configure(final SubSystem subSystem)
{
if (this.state == STATE_NEW)
{
try
{
this.module.configure(subSystem);
this.state = STATE_CONFIGURED;
return true;
}
catch (NoClassDefFoundError noClassDef)
{
Log.warn (new Log.SimpleMessage("Unable to load module classes for ",
this.module.getName(), ":", noClassDef.getMessage()));
this.state = STATE_ERROR;
}
catch (Exception e)
{
if (Log.isDebugEnabled())
{
// its still worth a warning, but now we are more verbose ...
Log.warn("Unable to configure the module " + this.module.getName(), e);
}
else if (Log.isWarningEnabled())
{
Log.warn("Unable to configure the module " + this.module.getName());
}
this.state = STATE_ERROR;
}
}
return false;
}
示例2: findLock
import org.jfree.util.Log; //導入方法依賴的package包/類
LockImpl findLock(final String asset) {
if (Log.isDebugEnabled()) {
log.debug("findLock: " + asset + " START");
}
final DBQuery q = DBFactory.getInstance().createQuery(
"select alock from " + LockImpl.class.getName() + " as alock inner join fetch alock.owner where alock.asset = :asset");
q.setParameter("asset", asset);
final List res = q.list();
if (res.size() == 0) {
log.debug("findLock: null END");
return null;
} else {
if (Log.isDebugEnabled()) {
log.debug("findLock: " + res.get(0) + " END");
}
return (LockImpl) res.get(0);
}
}
示例3: releaseAllLocksFor
import org.jfree.util.Log; //導入方法依賴的package包/類
/**
* @param identName
* the name of the identity to release all locks for (only the non-persistent locks in cluster mode, -not- the persistent locks!)
*/
public void releaseAllLocksFor(final String identName) {
if (Log.isDebugEnabled()) {
log.debug("releaseAllLocksFor: " + identName + " START");
}
final Identity ident = findIdentityByName(identName);
DBFactory.getInstance().delete("from " + LockImpl.class.getName() + " as alock inner join fetch " + "alock.owner as owner where owner.key = ?", ident.getKey(),
Hibernate.LONG);
// cluster:: can we save a query (and is it appropriate considering encapsulation)
// here by saying: alock.owner as owner where owner.name = ? (using identName parameter)
if (Log.isDebugEnabled()) {
log.debug("releaseAllLocksFor: " + identName + " END");
}
}
示例4: saveLock
import org.jfree.util.Log; //導入方法依賴的package包/類
void saveLock(final LockImpl alock) {
if (Log.isDebugEnabled()) {
log.debug("saveLock: " + alock + " START");
}
DBFactory.getInstance().saveObject(alock);
if (Log.isDebugEnabled()) {
log.debug("saveLock: " + alock + " END");
}
}
示例5: deleteLock
import org.jfree.util.Log; //導入方法依賴的package包/類
void deleteLock(final LockImpl li) {
if (Log.isDebugEnabled()) {
log.debug("deleteLock: " + li + " START");
}
DBFactory.getInstance().deleteObject(li);
if (Log.isDebugEnabled()) {
log.debug("deleteLock: " + li + " END");
}
}
示例6: getAllLocks
import org.jfree.util.Log; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
List<LockImpl> getAllLocks() {
log.debug("getAllLocks START");
final DBQuery q = DBFactory.getInstance().createQuery("select alock from " + LockImpl.class.getName() + " as alock inner join fetch alock.owner");
final List<LockImpl> res = q.list();
if (Log.isDebugEnabled()) {
log.debug("getAllLocks END. res.length:" + (res == null ? "null" : res.size()));
}
return res;
}
示例7: initialize
import org.jfree.util.Log; //導入方法依賴的package包/類
/**
* Initializes the contained module and raises the set of the module to
* STATE_INITIALIZED, if the module was not yet initialized. In case of an
* error, the module state will be set to STATE_ERROR and the module will
* not be available.
*
* @param subSystem the sub-system.
*
* @return true, if the module was successfully initialized, false otherwise.
*/
public boolean initialize(final SubSystem subSystem)
{
if (this.state == STATE_CONFIGURED)
{
try
{
this.module.initialize(subSystem);
this.state = STATE_INITIALIZED;
return true;
}
catch (NoClassDefFoundError noClassDef)
{
Log.warn (new Log.SimpleMessage("Unable to load module classes for ",
this.module.getName(), ":", noClassDef.getMessage()));
this.state = STATE_ERROR;
}
catch (ModuleInitializeException me)
{
if (Log.isDebugEnabled())
{
// its still worth a warning, but now we are more verbose ...
Log.warn("Unable to initialize the module " + this.module.getName(), me);
}
else if (Log.isWarningEnabled())
{
Log.warn("Unable to initialize the module " + this.module.getName());
}
this.state = STATE_ERROR;
}
catch (Exception e)
{
if (Log.isDebugEnabled())
{
// its still worth a warning, but now we are more verbose ...
Log.warn("Unable to initialize the module " + this.module.getName(), e);
}
else if (Log.isWarningEnabled())
{
Log.warn("Unable to initialize the module " + this.module.getName());
}
this.state = STATE_ERROR;
}
}
return false;
}
示例8: createLockImpl
import org.jfree.util.Log; //導入方法依賴的package包/類
LockImpl createLockImpl(final String asset, final OLATPrincipal owner) {
if (Log.isDebugEnabled()) {
log.debug("createLockImpl: " + asset + " by " + owner);
}
return new LockImpl(asset, (Identity) owner);
}
示例9: processMap
import org.jfree.util.Log; //導入方法依賴的package包/類
@Override
public void processMap(
NauticalMap map, MersenneTwisterFast random, FishState state) {
//create the object proper
ConstantWeather weather =
new ConstantWeather(
temperature.apply(state.getRandom()),
-1,0
);
//apply it to all the seatiles
for(SeaTile seaTile : map.getAllSeaTilesAsList())
seaTile.assignLocalWeather(weather);
//create the actuator from the csv column read
LinkedList<Double> windSpeeds = list.readColumn();
//create an actuator to change speed every day
actuator = TimeSeriesActuator.weatherDailySchedule(
windSpeeds,
Lists.newArrayList(weather));
if(Log.isDebugEnabled())
Log.debug("read " + windSpeeds.size() +" wind speeds");
//schedule it
state.scheduleEveryDay(actuator, StepOrder.BIOLOGY_PHASE);
//step it once!
actuator.step(state);
}