當前位置: 首頁>>代碼示例>>Java>>正文


Java Log.info方法代碼示例

本文整理匯總了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.");
  }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:31,代碼來源:DefaultLogModule.java

示例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;
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:23,代碼來源:AbstractBoot.java

示例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.");
        }
    }
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:22,代碼來源:MappingModel.java

示例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");
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:21,代碼來源:RenderingHintValueReadHandler.java

示例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");
}
 
開發者ID:mdzio,項目名稱:ccu-historian,代碼行數:21,代碼來源:RenderingHintsWriteHandler.java

示例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);

}
 
開發者ID:CarrKnight,項目名稱:POSEIDON,代碼行數:24,代碼來源:ThresholdAnswerTest.java

示例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);

}
 
開發者ID:CarrKnight,項目名稱:POSEIDON,代碼行數:23,代碼來源:ThresholdAnswerTest.java

示例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());

}
 
開發者ID:CarrKnight,項目名稱:POSEIDON,代碼行數:23,代碼來源:ThresholdAnswerTest.java

示例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());

}
 
開發者ID:CarrKnight,項目名稱:POSEIDON,代碼行數:23,代碼來源:ThresholdAnswerTest.java

示例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);

}
 
開發者ID:CarrKnight,項目名稱:POSEIDON,代碼行數:25,代碼來源:NarrativeBestTest.java

示例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()
            );
        }
    }

}
 
開發者ID:nologic,項目名稱:nabs,代碼行數:25,代碼來源:MappingModel.java

示例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);
}
 
開發者ID:VU-libtech,項目名稱:OLE-INST,代碼行數:21,代碼來源:LostNoticesExecutor.java

示例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;
}
 
開發者ID:VU-libtech,項目名稱:OLE-INST,代碼行數:26,代碼來源:LostNoticesExecutor.java

示例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;
}
 
開發者ID:VU-libtech,項目名稱:OLE-INST,代碼行數:26,代碼來源:CourtesyNoticesExecutor.java

示例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);
    }
 
開發者ID:groupon,項目名稱:DotCi,代碼行數:19,代碼來源:GithubOauthLoginAction.java


注:本文中的org.jfree.util.Log.info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。