Java Code Examples for org.apache.commons.logging.Log#isWarnEnabled()
The following examples show how to use
org.apache.commons.logging.Log#isWarnEnabled() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultSockJsService.java From spring-analysis-note with MIT License | 6 votes |
private static Set<TransportHandler> getDefaultTransportHandlers(@Nullable Collection<TransportHandler> overrides) { Set<TransportHandler> result = new LinkedHashSet<>(8); result.add(new XhrPollingTransportHandler()); result.add(new XhrReceivingTransportHandler()); result.add(new XhrStreamingTransportHandler()); result.add(new EventSourceTransportHandler()); result.add(new HtmlFileTransportHandler()); try { result.add(new WebSocketTransportHandler(new DefaultHandshakeHandler())); } catch (Exception ex) { Log logger = LogFactory.getLog(DefaultSockJsService.class); if (logger.isWarnEnabled()) { logger.warn("Failed to create a default WebSocketTransportHandler", ex); } } if (overrides != null) { result.addAll(overrides); } return result; }
Example 2
Source File: DefaultSockJsService.java From java-technology-stack with MIT License | 6 votes |
private static Set<TransportHandler> getDefaultTransportHandlers(@Nullable Collection<TransportHandler> overrides) { Set<TransportHandler> result = new LinkedHashSet<>(8); result.add(new XhrPollingTransportHandler()); result.add(new XhrReceivingTransportHandler()); result.add(new XhrStreamingTransportHandler()); result.add(new EventSourceTransportHandler()); result.add(new HtmlFileTransportHandler()); try { result.add(new WebSocketTransportHandler(new DefaultHandshakeHandler())); } catch (Exception ex) { Log logger = LogFactory.getLog(DefaultSockJsService.class); if (logger.isWarnEnabled()) { logger.warn("Failed to create a default WebSocketTransportHandler", ex); } } if (overrides != null) { result.addAll(overrides); } return result; }
Example 3
Source File: DefaultSockJsService.java From spring4-understanding with Apache License 2.0 | 6 votes |
private static Set<TransportHandler> getDefaultTransportHandlers(Collection<TransportHandler> overrides) { Set<TransportHandler> result = new LinkedHashSet<TransportHandler>(8); result.add(new XhrPollingTransportHandler()); result.add(new XhrReceivingTransportHandler()); result.add(new XhrStreamingTransportHandler()); result.add(new JsonpPollingTransportHandler()); result.add(new JsonpReceivingTransportHandler()); result.add(new EventSourceTransportHandler()); result.add(new HtmlFileTransportHandler()); try { result.add(new WebSocketTransportHandler(new DefaultHandshakeHandler())); } catch (Exception ex) { Log logger = LogFactory.getLog(DefaultSockJsService.class); if (logger.isWarnEnabled()) { logger.warn("Failed to create a default WebSocketTransportHandler", ex); } } if (overrides != null) { result.addAll(overrides); } return result; }
Example 4
Source File: NodeRef.java From alfresco-data-model with GNU Lesser General Public License v3.0 | 5 votes |
private static void logNodeRefError(String nodeRefId, Log logger) { if (logger.isWarnEnabled()) { StringBuilder msg = new StringBuilder(); msg.append("Target Node: ").append(nodeRefId); msg.append(" is not a valid NodeRef and has been ignored."); logger.warn(msg.toString()); } }
Example 5
Source File: LogUtils.java From alfresco-bulk-import with Apache License 2.0 | 4 votes |
public final static boolean warn(final Log log) { return(log.isWarnEnabled()); }