org.granite.logging.Logger.warn()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(292)

本文整理了Java中org.granite.logging.Logger.warn()方法的一些代码示例,展示了Logger.warn()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.warn()方法的具体详情如下:
包路径:org.granite.logging.Logger
类名称:Logger
方法名:warn

Logger.warn介绍

暂无

代码示例

代码示例来源:origin: org.graniteds/granite-client-java

  1. @Override
  2. public void onWebSocketText(String s) {
  3. log.warn("Websocket text message not supported");
  4. }
  5. }

代码示例来源:origin: org.graniteds/granite-client-javafx

  1. @Override
  2. public void onWebSocketText(String s) {
  3. log.warn("Websocket text message not supported");
  4. }
  5. }

代码示例来源:origin: org.graniteds/granite-server

  1. @Override
  2. protected void releaseAsyncHttpContext(AsyncHttpContext context) {
  3. // This method shouldn't be called in a WebLogic environment, anyway...
  4. try {
  5. if (context != null)
  6. context.getResponse().getOutputStream().close();
  7. }
  8. catch (Exception e) {
  9. log.warn(e, "Could not release asyncHttpContext for channel: %s", this);
  10. }
  11. }

代码示例来源:origin: org.graniteds/granite-server

  1. public void init(FilterConfig config) throws ServletException {
  2. String dumpDirString = ServletParams.get(config, DUMP_DIR, String.class, null);
  3. if (dumpDirString != null) {
  4. File dumpDir = new File(dumpDirString);
  5. if (!dumpDir.exists() || !dumpDir.isDirectory() || !dumpDir.canWrite())
  6. log.warn("Ignoring dump directory (is it a writable directory?): %s", dumpDir);
  7. else
  8. this.dumpDir = dumpDir;
  9. }
  10. }

代码示例来源:origin: org.graniteds/granite-server

  1. @Override
  2. protected void onTextMessage(CharBuffer buf) throws IOException {
  3. log.warn("Channel %s unsupported text message", getId());
  4. }
  5. }

代码示例来源:origin: org.graniteds/granite-server

  1. public void onPong(WebSocket websocket, byte[] data) {
  2. log.warn("Channel %s unsupported onPong message", getId());
  3. }

代码示例来源:origin: org.graniteds/granite-server

  1. @Override
  2. public void onWebSocketText(String s) {
  3. log.warn("Channel %s unsupported text message", getId());
  4. }

代码示例来源:origin: org.graniteds/granite-server

  1. protected void setMaxBinaryMessageBufferSize(int maxBinaryMessageBufferSize) {
  2. if (maxBinaryMessageBufferSize < 512)
  3. log.warn("Trying to set WebSocket maxBinaryMessageBufferSize too low: %d (ignored)", maxBinaryMessageBufferSize);
  4. else {
  5. log.debug("Setting MaxBinaryMessageBufferSize to: %d", maxBinaryMessageBufferSize);
  6. this.maxBinaryMessageBufferSize = maxBinaryMessageBufferSize;
  7. }
  8. }

代码示例来源:origin: org.graniteds/granite-server

  1. public void onFragment(WebSocket websocket, String message, boolean isLast) {
  2. log.warn("Channel %s unsupported onFragment text message", getId());
  3. }

代码示例来源:origin: org.graniteds/granite-server

  1. public void onMessage(WebSocket websocket, String message) {
  2. log.warn("Channel %s unsupported text message", getId());
  3. }

代码示例来源:origin: org.graniteds/granite-client

  1. protected MatchingMethod resolveMatchingMethod(List<MatchingMethod> methods, Class<?> serviceClass) {
  2. // Prefer methods of interfaces/classes marked with @RemoteDestination
  3. for (MatchingMethod m : methods) {
  4. if (m.serviceMethod.getDeclaringClass().isAnnotationPresent(RemoteDestination.class))
  5. return m;
  6. }
  7. // Then prefer method declared by the serviceClass (with EJBs, we have always 2 methods, one in the interface,
  8. // the other in the proxy, and the @RemoteDestination annotation cannot be find on the proxy class even
  9. // it is present on the original class).
  10. List<MatchingMethod> serviceClassMethods = new ArrayList<MatchingMethod>();
  11. for (MatchingMethod m : methods) {
  12. if (m.serviceMethod.getDeclaringClass().equals(serviceClass))
  13. serviceClassMethods.add(m);
  14. }
  15. if (serviceClassMethods.size() == 1)
  16. return serviceClassMethods.get(0);
  17. log.warn("Ambiguous method match for " + methods.get(0).serviceMethod.getName() + ", selecting first found " + methods.get(0).serviceMethod);
  18. return methods.get(0);
  19. }

代码示例来源:origin: org.graniteds/granite-server

  1. public void onFragment(WebSocket websocket, byte[] data, boolean isLast) {
  2. log.warn("Channel %s unsupported onFragment binary message", getId());
  3. }

代码示例来源:origin: org.graniteds/granite-server

  1. public void onPing(WebSocket websocket, byte[] data) {
  2. log.warn("Channel %s unsupported onPing message", getId());
  3. }

代码示例来源:origin: org.graniteds/granite-server

  1. @Override
  2. public void stop() throws ServiceException {
  3. super.stop();
  4. for (JMSClient jmsClient : jmsClients.values()) {
  5. try {
  6. jmsClient.close();
  7. }
  8. catch (Exception e) {
  9. log.warn(e, "Could not close JMSClient: %s", jmsClient);
  10. }
  11. }
  12. jmsClients.clear();
  13. }

代码示例来源:origin: org.graniteds/granite-client-javafx

  1. @Override
  2. public boolean removeConsumer(Consumer consumer) {
  3. String subscriptionId = consumer.getSubscriptionId();
  4. if (subscriptionId == null) {
  5. for (String sid : consumersMap.keySet()) {
  6. if (consumersMap.get(sid) == consumer) {
  7. subscriptionId = sid;
  8. break;
  9. }
  10. }
  11. }
  12. if (subscriptionId == null) {
  13. log.warn("Trying to remove unexisting consumer for destination %s", consumer.getDestination());
  14. return false;
  15. }
  16. return consumersMap.remove(subscriptionId) != null;
  17. }

代码示例来源:origin: org.graniteds/granite-client-java

  1. @Override
  2. public boolean removeConsumer(Consumer consumer) {
  3. String subscriptionId = consumer.getSubscriptionId();
  4. if (subscriptionId == null) {
  5. for (String sid : consumersMap.keySet()) {
  6. if (consumersMap.get(sid) == consumer) {
  7. subscriptionId = sid;
  8. break;
  9. }
  10. }
  11. }
  12. if (subscriptionId == null) {
  13. log.warn("Trying to remove unexisting consumer for destination %s", consumer.getDestination());
  14. return false;
  15. }
  16. return consumersMap.remove(subscriptionId) != null;
  17. }

代码示例来源:origin: org.graniteds/granite-server

  1. /**
  2. * Initialize the lazy property for the passed in entity.
  3. * @param entity the entity that has a lazy relationship
  4. * @param propertyNames the properties of the entity that has been marked lazy
  5. * @return the lazy collection
  6. */
  7. public Object lazyInitialize(Object entity, String[] propertyNames) {
  8. TidePersistenceManager pm = getTidePersistenceManager(true);
  9. if (pm == null) {
  10. log.warn("No persistence manager found: lazy initialization ignored for " + entity);
  11. return entity;
  12. }
  13. return pm.attachEntity(entity, propertyNames);
  14. }

代码示例来源:origin: org.graniteds/granite-server

  1. @Override
  2. protected void releaseAsyncHttpContext(AsyncHttpContext context) {
  3. try {
  4. if (context != null && context.getObject() != null)
  5. ((AsyncContext)context.getObject()).complete();
  6. }
  7. catch (Exception e) {
  8. log.warn(e, "Could not release asyncContext for channel: %s", this);
  9. }
  10. }

代码示例来源:origin: org.graniteds/granite-server

  1. @Override
  2. protected void releaseAsyncHttpContext(AsyncHttpContext context) {
  3. try {
  4. if (context != null && context.getObject() != null)
  5. ((CometEvent)context.getObject()).close();
  6. }
  7. catch (Exception e) {
  8. log.warn(e, "Could not release event for channel: %s", this);
  9. }
  10. }

代码示例来源:origin: org.graniteds/granite-server-cdi

  1. @AroundInvoke
  2. public Object doAround(InvocationContext invocation) throws Exception {
  3. Object result = invocation.proceed();
  4. Bean<?> bean = instrumentedBeans.getBean(invocation.getTarget().getClass());
  5. if (bean == null)
  6. log.warn("Instrumented Bean not found for class " + invocation.getTarget().getClass());
  7. else {
  8. String componentName = bean.getName();
  9. ScopedContextResult scr = new ScopedContextResult(componentName, null, invocation.getTarget());
  10. scr.setComponentClassName(bean.getBeanClass().getName());
  11. tideContext.addResultEval(scr);
  12. }
  13. return result;
  14. }
  15. }

相关文章