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


Java Log.info方法代碼示例

本文整理匯總了Java中org.eclipse.jetty.util.log.Log.info方法的典型用法代碼示例。如果您正苦於以下問題:Java Log.info方法的具體用法?Java Log.info怎麽用?Java Log.info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jetty.util.log.Log的用法示例。


在下文中一共展示了Log.info方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createRequest

import org.eclipse.jetty.util.log.Log; //導入方法依賴的package包/類
protected HttpUriRequest createRequest() throws URISyntaxException {
	URIBuilder uriBuilder = new URIBuilder()
		.setScheme("http")
		.setHost("localhost").setPort(9031)
		.setPath("/");
		
	URI uri = uriBuilder.build();
	Log.info("Getting URL="+uri);
	HttpUriRequest httpUriRequest = new HttpGet(uri);
	Log.info("Got URL="+uri);
	return httpUriRequest;
}
 
開發者ID:owlcollab,項目名稱:owltools,代碼行數:13,代碼來源:OWLServerMetadataTest.java

示例2: run

import org.eclipse.jetty.util.log.Log; //導入方法依賴的package包/類
@Override
public void run() {
          long currentTime = System.currentTimeMillis();
          for (HttpSession session : sessionMap.values()) {
              long lastActive = currentTime - session.getLastActivity();
              if (Log.isDebugEnabled()) {
              	Log.debug("Session was last active " + lastActive + " ms ago: " + session.getAddress());
              }
              if (lastActive > session.getInactivityTimeout() * JiveConstants.SECOND) {
              	Log.info("Closing idle session: " + session.getAddress());
                  session.close();
              }
          }
      }
 
開發者ID:idwanglu2010,項目名稱:openfire,代碼行數:15,代碼來源:HttpSessionManager.java

示例3: testServerCommunication

import org.eclipse.jetty.util.log.Log; //導入方法依賴的package包/類
@Test
	public void testServerCommunication() throws Exception {
		g = loadOntology("../OWLTools-Sim/src/test/resources/sim/mp-subset-1.obo");
		
		// set sim
		OwlSimFactory owlSimFactory = new SimpleOwlSimFactory();
		OwlSim sos = owlSimFactory.createOwlSim(g.getSourceOntology());
//		SimPreProcessor pproc = new NullSimPreProcessor();
//		pproc.setInputOntology(g.getSourceOntology());
//		pproc.setOutputOntology(g.getSourceOntology());
//		if (sos instanceof SimpleOwlSim)
//			((SimpleOwlSim) sos).setSimPreProcessor(pproc);
		sos.createElementAttributeMapFromOntology();
		// TODO	attributeAllByAllOld(opts);
		
		// create server
		Server server = new Server(9031);
		server.setHandler(new OWLServer(g, sos));
		try {
			server.start();

			// create a client
			HttpClient httpclient = new DefaultHttpClient();

			// prepare a request
			//final HttpUriRequest httpUriRequest = createRequest(200);
			HttpUriRequest httppost = createRequest();

			// run request
			Log.info("Executing="+httppost);
			//HttpResponse response = httpclient.execute(httpUriRequest);
			HttpResponse response = httpclient.execute(httppost);
			Log.info("Executed="+httpclient);
			
			// check response
			HttpEntity entity = response.getEntity();
			StatusLine statusLine = response.getStatusLine();
			if (statusLine.getStatusCode() == 200) {
				String responseContent = EntityUtils.toString(entity);
				handleResponse(responseContent);
			}
			else {
				Log.info("Status="+statusLine.getStatusCode());
				EntityUtils.consumeQuietly(entity);
			}

		}
		finally {
			// clean up
			server.stop();

//			if (pproc != null) {
//				pproc.dispose();
//			}
		}
	}
 
開發者ID:owlcollab,項目名稱:owltools,代碼行數:57,代碼來源:OWLServerMetadataTest.java

示例4: doStart

import org.eclipse.jetty.util.log.Log; //導入方法依賴的package包/類
protected void doStart() throws Exception {
    Log.info("Starting Bitronix Transaction Manager");
    TransactionManagerServices.getTransactionManager();
}
 
開發者ID:bitronix,項目名稱:btm,代碼行數:5,代碼來源:BTMLifeCycle.java

示例5: doStop

import org.eclipse.jetty.util.log.Log; //導入方法依賴的package包/類
protected void doStop() throws Exception {
    Log.info("Shutting down Bitronix Transaction Manager");
    TransactionManagerServices.getTransactionManager().shutdown();
}
 
開發者ID:bitronix,項目名稱:btm,代碼行數:5,代碼來源:BTMLifeCycle.java


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