当前位置: 首页>>代码示例>>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;未经允许,请勿转载。