本文整理汇总了Java中org.jfree.util.Log.info方法的典型用法代码示例。如果您正苦于以下问题:Java Log.info方法的具体用法?Java Log.info怎么用?Java Log.info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.util.Log
的用法示例。
在下文中一共展示了Log.info方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Initalizes the module. This method initializes the logging system, if the
* System.out logtarget is selected.
*
* @param subSystem the sub-system.
* @throws ModuleInitializeException if an error occured.
*/
public void initialize(final SubSystem subSystem)
throws ModuleInitializeException
{
if (LogConfiguration.isDisableLogging())
{
return;
}
if (LogConfiguration.getLogTarget().equals
(PrintStreamLogTarget.class.getName()))
{
DefaultLog.installDefaultLog();
Log.getInstance().addTarget(new PrintStreamLogTarget());
if ("true".equals(subSystem.getGlobalConfig().getConfigProperty
("org.jfree.base.LogAutoInit")))
{
Log.getInstance().init();
}
Log.info("Default log target started ... previous log messages " +
"could have been ignored.");
}
}
示例2: loadBooter
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Loads the specified booter implementation.
*
* @param classname the class name.
*
* @return The boot class.
*/
protected AbstractBoot loadBooter(final String classname) {
if (classname == null) {
return null;
}
try {
final Class c = ObjectUtilities.getClassLoader(
getClass()).loadClass(classname);
final Method m = c.getMethod("getInstance", (Class[]) null);
return (AbstractBoot) m.invoke(null, (Object[]) null);
}
catch (Exception e) {
Log.info ("Unable to boot dependent class: " + classname);
return null;
}
}
示例3: addManualMapping
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Adds a manual mapping.
*
* @param mappingInfo the mapping.
*/
public void addManualMapping(final ManualMappingInfo mappingInfo) {
if (!this.mappingInfos.containsKey(mappingInfo.getBaseClass())) {
this.manualMappings.add(mappingInfo);
this.mappingInfos.put(mappingInfo.getBaseClass(), mappingInfo);
}
else {
final Object o = this.mappingInfos.get(mappingInfo.getBaseClass());
if (o instanceof ManualMappingInfo) {
Log.info ("Duplicate manual mapping: " + mappingInfo.getBaseClass());
}
else {
throw new IllegalArgumentException
("This mapping is already a multiplex mapping.");
}
}
}
示例4: stringToHintField
import org.jfree.util.Log; //导入方法依赖的package包/类
private Object stringToHintField (final String name) {
final Field[] fields = RenderingHints.class.getFields();
for (int i = 0; i < fields.length; i++) {
final Field f = fields[i];
if (Modifier.isFinal(f.getModifiers())
&& Modifier.isPublic(f.getModifiers())
&& Modifier.isStatic(f.getModifiers())) {
try {
final String fieldName = f.getName();
if (fieldName.equals(name)) {
return f.get(null);
}
}
catch (Exception e) {
Log.info ("Unable to write RenderingHint", e);
}
}
}
throw new IllegalArgumentException("Invalid value given");
}
示例5: hintFieldToString
import org.jfree.util.Log; //导入方法依赖的package包/类
private String hintFieldToString(final Object o) {
final Field[] fields = RenderingHints.class.getFields();
for (int i = 0; i < fields.length; i++) {
final Field f = fields[i];
if (Modifier.isFinal(f.getModifiers())
&& Modifier.isPublic(f.getModifiers())
&& Modifier.isStatic(f.getModifiers())) {
try {
final Object value = f.get(null);
if (o.equals(value)) {
return f.getName();
}
}
catch (Exception e) {
Log.info ("Unable to write RenderingHint", e);
}
}
}
throw new IllegalArgumentException("Invalid value given");
}
示例6: allGood
import org.jfree.util.Log; //导入方法依赖的package包/类
@Test
public void allGood() throws Exception {
Log.info("needs at least 4 observations, has only 3");
ThresholdAnswer<Double> filter = new ThresholdAnswer<>(
3,
0,
"feature"
);
List<Double> selected = filter.answer(
options,
extractor,
mock(FishState.class),
mock(Fisher.class)
);
assertEquals(selected.size(),3);
}
示例7: oneGood
import org.jfree.util.Log; //导入方法依赖的package包/类
@Test
public void oneGood() throws Exception {
Log.info("needs at least 4 observations, has only 3");
ThresholdAnswer<Double> filter = new ThresholdAnswer<>(
3,
3,
"feature"
);
List<Double> selected = filter.answer(
options,
extractor,
mock(FishState.class),
mock(Fisher.class)
);
assertEquals(selected.size(),1);
}
示例8: tooFew
import org.jfree.util.Log; //导入方法依赖的package包/类
@Test
public void tooFew() throws Exception {
Log.info("needs at least 4 observations, has only 3");
ThresholdAnswer<Double> filter = new ThresholdAnswer<>(
4,
0,
"feature"
);
List<Double> selected = filter.answer(
options,
extractor,
mock(FishState.class),
mock(Fisher.class)
);
assertTrue(selected == null || selected.isEmpty());
}
示例9: tooLow
import org.jfree.util.Log; //导入方法依赖的package包/类
@Test
public void tooLow() throws Exception {
Log.info("needs numbers to be above 10, will not select any");
ThresholdAnswer<Double> filter = new ThresholdAnswer<>(
2,
10,
"feature"
);
List<Double> selected = filter.answer(
options,
extractor,
mock(FishState.class),
mock(Fisher.class)
);
assertTrue(selected == null || selected.isEmpty());
}
示例10: anarchyKillsOffAllFish
import org.jfree.util.Log; //导入方法依赖的package包/类
@Test
public void anarchyKillsOffAllFish() throws Exception
{
FishYAML yaml = new FishYAML();
Scenario scenario = yaml.loadAs(new FileReader(inputs.resolve("anarchy.yaml").toFile()), Scenario.class);
FishState state = new FishState(System.currentTimeMillis());
state.setScenario(scenario);
state.start();
double initialBiomass = state.getTotalBiomass(state.getSpecies().get(0));
//we expect no regulation to achieve biomass levels of 5% or less
while(state.getYear()<20)
state.schedule.step(state);
double finalBiomass = state.getTotalBiomass(state.getSpecies().get(0));
Log.info("final biomass : " + finalBiomass + " which is " + (finalBiomass/initialBiomass) + "% of the initial value; we are targeting 5% or lower");
System.out.println("final biomass : " + finalBiomass + " which is " + (finalBiomass/initialBiomass) + "% of the initial value; we are targeting 5% or lower");
assertTrue(finalBiomass< initialBiomass *.05);
}
示例11: addMultiplexMapping
import org.jfree.util.Log; //导入方法依赖的package包/类
/**
* Adds a multiplex mapping.
*
* @param mappingInfo the mapping.
*/
public void addMultiplexMapping(final MultiplexMappingInfo mappingInfo) {
if (!this.mappingInfos.containsKey(mappingInfo.getBaseClass())) {
this.multiplexMappings.add(mappingInfo);
this.mappingInfos.put(mappingInfo.getBaseClass(), mappingInfo);
}
else {
final Object o = this.mappingInfos.get(mappingInfo.getBaseClass());
if (o instanceof ManualMappingInfo) {
throw new IllegalArgumentException
("This mapping is already a manual mapping.");
}
else {
Log.info(
"Duplicate Multiplex mapping: " + mappingInfo.getBaseClass(), new Exception()
);
}
}
}
示例12: postProcess
import org.jfree.util.Log; //导入方法依赖的package包/类
@Override
protected void postProcess(List<OleLoanDocument> loanDocuments) {
List<String> itemUUIDS = new ArrayList<String>();
for (Iterator<OleLoanDocument> iterator = loanDocuments.iterator(); iterator.hasNext(); ) {
OleLoanDocument loanDocument = iterator.next();
for (OLEDeliverNotice oleDeliverNotice : loanDocument.getDeliverNotices()) {
LOG.info("LostNoticesExecutor thread id---->" + Thread.currentThread().getId() + "current thread---->" + Thread.currentThread() + "Loan id-->" + loanDocument.getLoanId() + "notice id--->" + oleDeliverNotice.getId());
Timestamp toBeSendDate = oleDeliverNotice.getNoticeToBeSendDate();
if (oleDeliverNotice.getNoticeType().equals(OLEConstants.NOTICE_LOST) && toBeSendDate.compareTo(getSendToDate(OLEConstants.LOST_NOTICE_TO_DATE)) <
0) {
try {
itemUUIDS.add(loanDocument.getItemUuid());
} catch (Exception e) {
Log.info(e.getStackTrace());
}
}
}
}
itemStatusBulkUpdate(itemUUIDS);
}
示例13: buildNoticesForDeletion
import org.jfree.util.Log; //导入方法依赖的package包/类
@Override
public List<OLEDeliverNotice> buildNoticesForDeletion() {
List<OLEDeliverNotice> oleDeliverNotices = new ArrayList<>();
for (OleLoanDocument loanDocument : loanDocuments) {
if (loanDocument.getItemTypeName() != null) {
loanDocument.setItemType(getItemTypeCodeByName(loanDocument.getItemTypeName()));
}
Timestamp lostNoticetoSendDate = getSendToDate(OLEConstants.LOST_NOTICE_TO_DATE);
for (OLEDeliverNotice oleDeliverNotice : loanDocument.getDeliverNotices()) {
LOG.info("LostNoticesExecutor thread id---->" + Thread.currentThread().getId() + "current thread---->" + Thread.currentThread() + "Loan id-->" + loanDocument.getLoanId() + "notice id--->" + oleDeliverNotice.getId());
Timestamp toBeSendDate = oleDeliverNotice.getNoticeToBeSendDate();
if (oleDeliverNotice.getNoticeType().equals(OLEConstants.NOTICE_LOST) && toBeSendDate.compareTo(lostNoticetoSendDate) < 0) {
try {
//itemUUIDS.add(loanDocument.getItemUuid());
oleDeliverNotices.add(oleDeliverNotice);
} catch (Exception e) {
Log.info(e.getStackTrace());
}
}
}
}
return oleDeliverNotices;
}
示例14: buildNoticesForDeletion
import org.jfree.util.Log; //导入方法依赖的package包/类
@Override
public List<OLEDeliverNotice> buildNoticesForDeletion() {
List<OLEDeliverNotice> oleDeliverNotices = new ArrayList<>();
for (OleLoanDocument loanDocument:loanDocuments) {
if (loanDocument.getItemTypeName() != null) {
loanDocument.setItemType(getItemTypeCodeByName(loanDocument.getItemTypeName()));
}
for (OLEDeliverNotice oleDeliverNotice : loanDocument.getDeliverNotices()) {
LOG.info("CourtesyNoticesExecutor thread id---->"+Thread.currentThread().getId()+"current thread---->"+Thread.currentThread()+"Loan id-->"+loanDocument.getLoanId()+"notice id--->"+oleDeliverNotice.getId());
Timestamp toBeSendDate = oleDeliverNotice.getNoticeToBeSendDate();
if (oleDeliverNotice.getNoticeType().equals(OLEConstants.NOTICE_COURTESY) && toBeSendDate.compareTo
(getSendToDate(OLEConstants.COURTESY_NOTICE_TO_DATE)) < 0) {
try {
oleDeliverNotices.add(oleDeliverNotice);
} catch (Exception e) {
Log.info(e.getStackTrace());
}
}
}
}
return oleDeliverNotices;
}
示例15: doFinishLogin
import org.jfree.util.Log; //导入方法依赖的package包/类
public HttpResponse doFinishLogin(StaplerRequest request, StaplerResponse rsp) throws IOException {
String code = request.getParameter("code");
if (code == null || code.trim().length() == 0) {
Log.info("doFinishLogin: missing code.");
return HttpResponses.redirectToContextRoot();
}
String content = postForAccessToken(code);
String accessToken = extractToken(content);
updateOfflineAccessTokenForUser(accessToken);
request.getSession().setAttribute("access_token", accessToken);
String newProjectSetupUrl = getJenkinsRootUrl() + "/" + GithubReposController.URL;
return HttpResponses.redirectTo(newProjectSetupUrl);
}