本文整理汇总了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;
}
示例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();
}
}
}
示例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();
// }
}
}
示例4: doStart
import org.eclipse.jetty.util.log.Log; //导入方法依赖的package包/类
protected void doStart() throws Exception {
Log.info("Starting Bitronix Transaction Manager");
TransactionManagerServices.getTransactionManager();
}
示例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();
}