本文整理汇总了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);
}