本文整理匯總了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();
}