本文整理了Java中org.eclipse.jetty.util.log.Log.warn()
方法的一些代码示例,展示了Log.warn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.warn()
方法的具体详情如下:
包路径:org.eclipse.jetty.util.log.Log
类名称:Log
方法名:warn
暂无
代码示例来源:origin: org.scalatra.socketio-java/socketio-core
@Override
public void onMessage(String message) {
if (inbound != null) {
try {
inbound.onMessage(SocketIOFrame.TEXT_MESSAGE_TYPE, message);
} catch (Throwable e) {
Log.warn("Session["+sessionId+"]: Exception thrown by SocketIOInbound.onMessage()", e);
}
}
}
代码示例来源:origin: tadglines/Socket.IO-Java
@Override
public void onMessage(String message) {
if (inbound != null) {
try {
inbound.onMessage(SocketIOFrame.TEXT_MESSAGE_TYPE, message);
} catch (Throwable e) {
Log.warn("Session["+sessionId+"]: Exception thrown by SocketIOInbound.onMessage()", e);
}
}
}
代码示例来源:origin: jetty-project/i-jetty
public boolean accept(File dir, String name) {
try {
if (name.endsWith(".xml") && dir.equals(getConfigurationDir().getFile())) {
return true;
}
return false;
} catch (IOException e) {
Log.warn(e);
return false;
}
}
});
代码示例来源:origin: org.scalatra.socketio-java/socketio-core
protected void writeData(ServletResponse response, String data) throws IOException {
try {
getIdleCheck().activity();
} catch (Exception e) {
Log.warn(e);
}
response.getOutputStream().print("<script>parent.s._("+ JSON.toString(data) +", document);</script>");
response.flushBuffer();
}
代码示例来源:origin: org.scalatra.socketio-java/socketio-core
protected void writeData(ServletResponse response, String data) throws IOException {
try {
getIdleCheck().activity();
} catch (Exception e) { Log.warn(e); }
Log.debug("Session["+session.getSessionId()+"]: writeData(START): " + data);
ServletOutputStream os = response.getOutputStream();
os.println("Content-Type: text/plain");
os.println();
os.println(data);
os.println(boundarySeperator);
response.flushBuffer();
Log.debug("Session["+session.getSessionId()+"]: writeData(END): " + data);
}
代码示例来源:origin: tadglines/Socket.IO-Java
@Override
public void onConnect(SessionTransportHandler handler) {
if (handler == null) {
state = ConnectionState.CLOSED;
inbound = null;
socketIOSessions.remove(sessionId);
} else if (this.handler == null) {
this.handler = handler;
try {
state = ConnectionState.CONNECTED;
inbound.onConnect(handler);
} catch (Throwable e) {
Log.warn("Session["+sessionId+"]: Exception thrown by SocketIOInbound.onConnect()", e);
state = ConnectionState.CLOSED;
handler.abort();
}
} else {
handler.abort();
}
}
代码示例来源:origin: org.scalatra.socketio-java/socketio-core
@Override
public void onConnect(SessionTransportHandler handler) {
if (handler == null) {
state = ConnectionState.CLOSED;
inbound = null;
socketIOSessions.remove(sessionId);
} else if (this.handler == null) {
this.handler = handler;
try {
state = ConnectionState.CONNECTED;
inbound.onConnect(handler);
} catch (Throwable e) {
Log.warn("Session["+sessionId+"]: Exception thrown by SocketIOInbound.onConnect()", e);
state = ConnectionState.CLOSED;
handler.abort();
}
} else {
handler.abort();
}
}
代码示例来源:origin: tadglines/Socket.IO-Java
@Override
public void onDisconnect(DisconnectReason reason) {
Log.debug("Session["+sessionId+"]: onDisconnect: " + reason);
clearTimeoutTimer();
clearHeartbeatTimer();
if (inbound != null) {
state = ConnectionState.CLOSED;
try {
inbound.onDisconnect(reason, null);
} catch (Throwable e) {
Log.warn("Session["+sessionId+"]: Exception thrown by SocketIOInbound.onDisconnect()", e);
}
inbound = null;
}
}
代码示例来源:origin: org.scalatra.socketio-java/socketio-core
@Override
public void onDisconnect(DisconnectReason reason) {
Log.debug("Session["+sessionId+"]: onDisconnect: " + reason);
clearTimeoutTimer();
clearHeartbeatTimer();
if (inbound != null) {
state = ConnectionState.CLOSED;
try {
inbound.onDisconnect(reason, null);
} catch (Throwable e) {
Log.warn("Session["+sessionId+"]: Exception thrown by SocketIOInbound.onDisconnect()", e);
}
inbound = null;
}
}
代码示例来源:origin: jetty-project/i-jetty
public void addJars(Resource lib)
{
if (lib.exists() && lib.isDirectory())
{
String[] files=lib.list();
for (int f=0;files!=null && f<files.length;f++)
{
try
{
Resource fn=lib.addPath(files[f]);
String fnlc=fn.getName().toLowerCase();
if (!fn.isDirectory() && isAndroidArchive(fnlc))
{
String jar=fn.getFile().getAbsolutePath();
addClassPath(jar);
}
}
catch (Exception ex)
{
Log.warn(Log.EXCEPTION,ex);
}
}
}
}
代码示例来源:origin: sonian/elasticsearch-jetty
@Override
public UserIdentity loadUser(String user) {
Log.debug("attempting to load user [{}]", user);
try {
GetResponse response = client.prepareGet(authIndex, authType, user)
.setFields(passwordField, rolesField)
.execute().actionGet();
if (response.isExists()) {
Log.debug("user [{}] exists; looking for credentials...", user);
Credential credential = null;
GetField passwordGetField = response.getField(passwordField);
if (passwordGetField != null) {
Log.debug("user [{}] using password auth", user);
credential = Credential.getCredential((String) passwordGetField.getValue());
}
String[] roles = getStringValues(response.getField(rolesField));
return putUser(user, credential, roles);
}
} catch (IndexMissingException e) {
Log.warn("no auth index [{}]", authIndex);
} catch (Exception e) {
Log.warn("error finding user [" + user + "] in [" + authIndex + "]", e);
}
return null;
}
代码示例来源:origin: jetty-project/i-jetty
protected void doStart() throws Exception {
if (_configurationDir == null) {
Log.warn("No configuration dir specified");
throw new IllegalStateException("No configuration dir specified");
内容来源于网络,如有侵权,请联系作者删除!