com.liferay.faces.util.logging.Logger.warn()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(251)

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

Logger.warn介绍

暂无

代码示例

代码示例来源:origin: com.liferay.faces/com.liferay.faces.util

  1. public ScriptImpl(String sourceCode, String[] modules, ModulesType modulesType) {
  2. this.sourceCode = sourceCode;
  3. if ((modules != null) && (modulesType == null)) {
  4. logger.warn("Modules will be ignored on scripts with modulesType == null.");
  5. }
  6. this.modules = modules;
  7. this.modulesType = modulesType;
  8. }

代码示例来源:origin: liferay/liferay-faces

  1. public void setStatus(int sc) {
  2. logger.warn("No equivalent for HttpServletResponse.setStatus(int=[{0}]) for PortletResponse", sc);
  3. }

代码示例来源:origin: liferay/liferay-faces

  1. public void sendError(int sc) throws IOException {
  2. logger.warn("No equivalent for HttpServletResponse.sendError(int=[{0}]) for PortletResponse", sc);
  3. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. public void sendError(int sc) throws IOException {
  2. logger.warn("No equivalent for HttpServletResponse.sendError(int=[{0}]) for PortletResponse", sc);
  3. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. public void setStatus(int sc) {
  2. logger.warn("No equivalent for HttpServletResponse.setStatus(int=[{0}]) for PortletResponse", sc);
  3. }

代码示例来源:origin: liferay/liferay-faces

  1. public void warn(Object msg, Throwable t) {
  2. logger.warn(msg.toString());
  3. }

代码示例来源:origin: liferay/liferay-faces

  1. public void warn(Object msg) {
  2. logger.warn(msg.toString());
  3. }

代码示例来源:origin: liferay/liferay-faces

  1. public void warn(Throwable t) {
  2. logger.warn(t.getMessage());
  3. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. /**
  2. * @see {@link ExternalContext#addResponseHeader(String, String)}
  3. * @since JSF 2.0
  4. */
  5. @Override
  6. public void addResponseHeader(String name, String value) {
  7. if (portletResponse instanceof ResourceResponse) {
  8. ResourceResponse resourceResponse = (ResourceResponse) portletResponse;
  9. resourceResponse.addProperty(name, value);
  10. }
  11. else {
  12. logger.warn("Unable to call {0} for portletResponse=[{1}] because it is not a ResourceResponse.",
  13. "portletResponse.addProperty(String, String)", portletResponse.getClass().getName());
  14. }
  15. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. protected String getFacesViewIdRequestParameter(String name) {
  2. String value = getPortletRequest().getParameter(name);
  3. if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
  4. logger.warn("Invalid character in request parameter {0}=[{1}]", name, value);
  5. value = null;
  6. }
  7. return value;
  8. }

代码示例来源:origin: liferay/liferay-faces

  1. protected String getFacesViewIdRequestParameter(String name) {
  2. String value = getPortletRequest().getParameter(name);
  3. if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
  4. logger.warn("Invalid character in request parameter {0}=[{1}]", name, value);
  5. value = null;
  6. }
  7. return value;
  8. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. protected String getFacesViewIdRequestAttribute(String name) {
  2. String value = (String) getPortletRequest().getAttribute(name);
  3. if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
  4. logger.warn("Invalid character in request attribute {0}=[{1}]", name, value);
  5. value = null;
  6. }
  7. return value;
  8. }

代码示例来源:origin: liferay/liferay-faces

  1. protected String getFacesViewIdRequestAttribute(String name) {
  2. String value = (String) getPortletRequest().getAttribute(name);
  3. if ((value != null) && (value.contains(":") || value.contains("%3A") || value.contains("%253A"))) {
  4. logger.warn("Invalid character in request attribute {0}=[{1}]", name, value);
  5. value = null;
  6. }
  7. return value;
  8. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. public void destroy() {
  2. initialized = false;
  3. // FACES-1450: Surround with try/catch block in order to prevent hot re-deploys from failing in Liferay Portal.
  4. try {
  5. BridgeRequestScopeManagerFactory bridgeRequestScopeManagerFactory = (BridgeRequestScopeManagerFactory)
  6. BridgeFactoryFinder.getFactory(BridgeRequestScopeManagerFactory.class);
  7. BridgeRequestScopeManager bridgeRequestScopeManager =
  8. bridgeRequestScopeManagerFactory.getBridgeRequestScopeManager();
  9. bridgeRequestScopeManager.removeBridgeRequestScopesByPortlet(portletConfig);
  10. }
  11. catch (Throwable t) {
  12. logger.warn(t.getMessage());
  13. }
  14. }

代码示例来源:origin: liferay/liferay-faces

  1. public void destroy() {
  2. initialized = false;
  3. // FACES-1450: Surround with try/catch block in order to prevent hot re-deploys from failing in Liferay Portal.
  4. try {
  5. BridgeRequestScopeManagerFactory bridgeRequestScopeManagerFactory = (BridgeRequestScopeManagerFactory)
  6. BridgeFactoryFinder.getFactory(BridgeRequestScopeManagerFactory.class);
  7. BridgeRequestScopeManager bridgeRequestScopeManager =
  8. bridgeRequestScopeManagerFactory.getBridgeRequestScopeManager();
  9. bridgeRequestScopeManager.removeBridgeRequestScopesByPortlet(portletConfig);
  10. }
  11. catch (Throwable t) {
  12. logger.warn(t.getMessage());
  13. }
  14. }

代码示例来源:origin: com.liferay.faces/liferay-faces-bridge-impl

  1. @Override
  2. public void startElement(String name, UIComponent component) throws IOException {
  3. if ("title".equals(name)) {
  4. logger.warn(
  5. "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
  6. titleElement = true;
  7. }
  8. else {
  9. Element element = createElement(name);
  10. ElementWriter elementWriter = new ElementWriter(element);
  11. elementWriterStack.push(elementWriter);
  12. logger.trace("PUSHED element name=[{0}]", name);
  13. }
  14. }

代码示例来源:origin: liferay/liferay-faces

  1. @Override
  2. public void startElement(String name, UIComponent component) throws IOException {
  3. if ("title".equals(name)) {
  4. logger.warn(
  5. "Title removed because multiple <title> elements are invalid and the portlet container controls the <title>.");
  6. titleElement = true;
  7. }
  8. else {
  9. Element element = createElement(name);
  10. ElementWriter elementWriter = new ElementWriter(element);
  11. elementWriterStack.push(elementWriter);
  12. logger.trace("PUSHED element name=[{0}]", name);
  13. }
  14. }

代码示例来源:origin: com.liferay.faces/liferay-faces-alloy

  1. protected void encodeMediaSource(ResponseWriter responseWriter, String mediaResourceURL, String contentType)
  2. throws IOException {
  3. responseWriter.startElement("source", null);
  4. responseWriter.writeAttribute("src", mediaResourceURL, null);
  5. if (contentType != null) {
  6. responseWriter.writeAttribute("type", contentType, null);
  7. }
  8. else {
  9. logger.warn("The contentType of ResourceURL=[{0}] was not specified.", mediaResourceURL);
  10. }
  11. responseWriter.endElement("source");
  12. }

代码示例来源:origin: com.liferay.faces/com.liferay.faces.alloy

  1. protected void encodeMediaSource(ResponseWriter responseWriter, String mediaResourceURL, String contentType)
  2. throws IOException {
  3. responseWriter.startElement("source", null);
  4. responseWriter.writeAttribute("src", mediaResourceURL, null);
  5. if (contentType != null) {
  6. responseWriter.writeAttribute("type", contentType, null);
  7. }
  8. else {
  9. logger.warn("The contentType of ResourceURL=[{0}] was not specified.", mediaResourceURL);
  10. }
  11. responseWriter.endElement("source");
  12. }

代码示例来源:origin: liferay/liferay-faces

  1. protected void encodeMediaSource(ResponseWriter responseWriter, String mediaResourceURL, String contentType)
  2. throws IOException {
  3. responseWriter.startElement("source", null);
  4. responseWriter.writeAttribute("src", mediaResourceURL, null);
  5. if (contentType != null) {
  6. responseWriter.writeAttribute("type", contentType, null);
  7. }
  8. else {
  9. logger.warn("The contentType of ResourceURL=[{0}] was not specified.", mediaResourceURL);
  10. }
  11. responseWriter.endElement("source");
  12. }

相关文章