org.gatein.common.logging.Logger.error()方法的使用及代码示例

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

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

Logger.error介绍

暂无

代码示例

代码示例来源:origin: org.gatein.sso/sso-agent

  1. protected void log(String message, Throwable throwable)
  2. {
  3. log.error(message, throwable);
  4. }
  5. }

代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common

  1. public void error(SAXParseException exception) throws SAXException
  2. {
  3. log.error("Error in document " + identifier + " at (" + exception.getLineNumber() + "," + exception.getColumnNumber()
  4. + ") :" + exception.getMessage());
  5. valid = false;
  6. }

代码示例来源:origin: org.exoplatform.portal/exo.portal.component.common

  1. public void fatalError(SAXParseException exception) throws SAXException
  2. {
  3. log.error("Fatal error in document " + identifier + " at (" + exception.getLineNumber() + "," + exception.getColumnNumber()
  4. + ") :" + exception.getMessage());
  5. valid = false;
  6. }
  7. }

代码示例来源:origin: org.gatein.pc/pc-mc

  1. public LocalizedString getLocalizedString(Object key)
  2. {
  3. try
  4. {
  5. return this.map.get(key) != null ? this.map.get(key).getLocalizedString() : null;
  6. }
  7. catch (Exception e)
  8. {
  9. log.error("could not generate localized string.", e);
  10. return null;
  11. }
  12. }

代码示例来源:origin: org.gatein.pc/pc-portlet

  1. public void destroy()
  2. {
  3. if (instance == null)
  4. {
  5. throw new IllegalStateException("No instance created previously");
  6. }
  7. //
  8. try
  9. {
  10. stop(instance);
  11. }
  12. catch (Error e)
  13. {
  14. log.error("Stopping the " + type + " threw an error", e);
  15. }
  16. catch (Exception e)
  17. {
  18. log.error("Stopping the " + type + " threw an exception", e);
  19. }
  20. }

代码示例来源:origin: org.gatein.pc/pc-controller

  1. public Iterable<WindowEvent> eventProduced(EventControllerContext controllerContext, EventPhaseContext phaseContext, WindowEvent sourceEvent, WindowEvent producedEvent)
  2. {
  3. try
  4. {
  5. return controllerContext.eventProduced(phaseContext, producedEvent, sourceEvent);
  6. }
  7. catch (Exception e)
  8. {
  9. log.error("Cannot deliver produced event " + producedEvent + " because the event " +
  10. "controller context threw a runtime exception", e);
  11. //
  12. return Collections.emptyList();
  13. }
  14. }

代码示例来源:origin: org.gatein.pc/pc-controller

  1. public boolean eventConsumed(EventControllerContext controllerContext, EventPhaseContext phaseContext, WindowEvent consumedEvent, PortletInvocationResponse consumerResponse)
  2. {
  3. try
  4. {
  5. controllerContext.eventConsumed(phaseContext, consumedEvent, consumerResponse);
  6. //
  7. return true;
  8. }
  9. catch (Exception e)
  10. {
  11. log.error("Event consumed callback threw an exception that is ignored by the controller", e);
  12. //
  13. return false;
  14. }
  15. }

代码示例来源:origin: org.gatein.pc/pc-controller

  1. public boolean eventFailed(EventControllerContext controllerContext, EventPhaseContext phaseContext, WindowEvent failedEvent, Throwable throwable)
  2. {
  3. try
  4. {
  5. controllerContext.eventFailed(phaseContext, failedEvent, throwable);
  6. //
  7. return true;
  8. }
  9. catch (Exception e1)
  10. {
  11. log.error("Event delivery failed callback threw an exception that is ignored by the controller", e1);
  12. //
  13. return false;
  14. }
  15. }

代码示例来源:origin: org.gatein.pc/pc-controller

  1. public boolean eventDiscarded(EventControllerContext controllerContext, EventPhaseContext phaseContext, WindowEvent discardedEvent, int cause)
  2. {
  3. try
  4. {
  5. controllerContext.eventDiscarded(phaseContext, discardedEvent, cause);
  6. //
  7. return true;
  8. }
  9. catch (Exception e1)
  10. {
  11. log.error("Event delivery failed callback threw an exception that is ignored by the controller", e1);
  12. //
  13. return false;
  14. }
  15. }
  16. }

代码示例来源:origin: org.gatein.pc/pc-test-core

  1. /**
  2. * Returns Sequence for current testId Returns null if there is no Sequence for current testId
  3. *
  4. * @return
  5. * @throws javax.servlet.ServletException if there is no SequenceRegistry
  6. */
  7. protected PortletTestCase getSequence(String testId) throws ServletException
  8. {
  9. PortletTestCase testCase = PortletTestServlet.getTestCase(testId);
  10. if (testCase == null)
  11. {
  12. log.error("No test case object found in current context");
  13. throw new ServletException("No test case object found in context");
  14. }
  15. return testCase;
  16. }

代码示例来源:origin: org.gatein.pc/pc-controller

  1. public PortletInfo getPortletInfo(String windowId)
  2. {
  3. try
  4. {
  5. return getPortlet(windowId).getInfo();
  6. }
  7. catch (PortletInvokerException e)
  8. {
  9. log.error("Could not access portlet invoker for locating window " + windowId, e);
  10. //
  11. return null;
  12. }
  13. }

代码示例来源:origin: org.gatein.pc/pc-test-core

  1. /**
  2. * Returns Sequence for current testId Returns null if there is no Sequence for current testId
  3. *
  4. * @return
  5. * @throws PortletException if there is no SequenceRegistry
  6. */
  7. private PortletTestCase getSequence(String testId) throws PortletException
  8. {
  9. PortletTestCase testCase = PortletTestServlet.getTestCase(testId);
  10. if (testCase == null)
  11. {
  12. log.error("No test suite object found in current context");
  13. throw new PortletException("No test suite object found in context");
  14. }
  15. return testCase;
  16. }

代码示例来源:origin: org.gatein.sso/sso-agent

  1. public JOSSOAgentImpl(InitParams params)
  2. {
  3. try
  4. {
  5. this.httpAgent = JOSSOUtils.lookupSSOAgent();
  6. this.httpAgent.start();
  7. log.info("JOSSO agent started successfuly!");
  8. }
  9. catch(Exception e)
  10. {
  11. log.error(this, e);
  12. throw new RuntimeException(e);
  13. }
  14. }

代码示例来源:origin: org.gatein.pc/pc-test-core

  1. public void render(RendererContext context) throws IOException
  2. {
  3. if (response.getCause() != null)
  4. {
  5. log.error("Portlet action threw an error: " + response.getMessage(), response.getCause());
  6. }
  7. else
  8. {
  9. log.error("Portlet action threw an error: " + response.getMessage());
  10. }
  11. //
  12. context.getClientResponse().sendError(404, response.getMessage());
  13. }
  14. }

代码示例来源:origin: org.gatein.pc/pc-test-core

  1. public final Response execute(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
  2. {
  3. try
  4. {
  5. return runWithRuntimeException(portlet, request, response, context);
  6. }
  7. catch (AssertionError t)
  8. {
  9. getLogger().error("The test case failed", t);
  10. //
  11. return new FailureResponse(Failure.createFailure(t));
  12. }
  13. }

代码示例来源:origin: org.gatein.pc/pc-test-core

  1. public final Response execute(Portlet portlet, PortletRequest request, PortletResponse response, PortletTestContext context) throws PortletException, IOException
  2. {
  3. try
  4. {
  5. return runWithRuntimeException(portlet, request, response, context);
  6. }
  7. catch (AssertionError t)
  8. {
  9. getLogger().error("The test case failed", t);
  10. //
  11. return new FailureResponse(Failure.createFailure(t));
  12. }
  13. }

代码示例来源:origin: org.gatein.pc/pc-test-core

  1. public final Response execute(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
  2. {
  3. try
  4. {
  5. runWithRuntimeException(portlet, request, response, context);
  6. //
  7. return null;
  8. }
  9. catch (AssertionError t)
  10. {
  11. getLogger().error("The test case failed", t);
  12. //
  13. return new FailureResponse(Failure.createFailure(t));
  14. }
  15. }

代码示例来源:origin: org.gatein.pc/pc-test-core

  1. public final Response execute(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
  2. {
  3. try
  4. {
  5. runWithRuntimeException(portlet, request, response, context);
  6. //
  7. return null;
  8. }
  9. catch (AssertionError t)
  10. {
  11. getLogger().error("The test case failed", t);
  12. //
  13. return new FailureResponse(Failure.createFailure(t));
  14. }
  15. }

代码示例来源:origin: org.gatein.portal/exo.portal.component.identity

  1. @Override
  2. public void start() {
  3. try {
  4. if (configuration.isUseJTA()) {
  5. jtaTransactionLifecycleService.registerListener(new IDMTransactionSyncListener(idmService_));
  6. }
  7. acceptComponentRequestCall = true;
  8. RequestLifeCycle.begin(this);
  9. super.start();
  10. } catch (Exception e) {
  11. log.error(e.getMessage(), e);
  12. } finally {
  13. RequestLifeCycle.end();
  14. }
  15. }

代码示例来源:origin: org.gatein.integration/extension-component

  1. public void start() {
  2. if (!bypass) {
  3. try {
  4. startProducer();
  5. startConsumers();
  6. // listen for web app events so that we can inject services into WSRP admin UI "cleanly"
  7. // todo: this service injection should really be done using CDI... :/
  8. ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
  9. servletContainer.addWebAppListener(this);
  10. log.info("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' STARTED");
  11. } catch (Exception e) {
  12. log.error("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' FAILED to start", e);
  13. }
  14. }
  15. }

相关文章