org.gatein.common.logging.Logger类的使用及代码示例

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

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

Logger介绍

暂无

代码示例

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

  1. protected void log(String message)
  2. {
  3. log.debug(message);
  4. }

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

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

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

  1. public void setSkipExpirationOfStructureCacheEntries(boolean skipExpirationOfStructureCacheEntries) {
  2. if (cacheManager != null && (skipExpirationOfStructureCacheEntries != this.skipExpirationOfStructureCacheEntries)) {
  3. log.warn("CacheManager is already initialized. Setting of skipExpirationOfStructureCacheEntries won't have effect");
  4. } else {
  5. this.skipExpirationOfStructureCacheEntries = skipExpirationOfStructureCacheEntries;
  6. }
  7. }

代码示例来源:origin: org.gatein.wci/wci-tomcat7

  1. private boolean getCrossContextLogoutConfig() {
  2. String val = getServletContext().getInitParameter(CROSS_CONTEXT_LOGOUT_KEY);
  3. if (val == null || Boolean.valueOf(val))
  4. return true;
  5. if (!"false".equalsIgnoreCase(val))
  6. log.warn("Context init param " + CROSS_CONTEXT_LOGOUT_KEY + " value is invalid: " + val + " - falling back to: false");
  7. log.info("Cross-context session invalidation on logout disabled");
  8. return false;
  9. }
  10. }

代码示例来源: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.sso/sso-agent

  1. /**
  2. * Performs portal logout by calling WCI logout.
  3. *
  4. * @param request
  5. * @param response
  6. */
  7. protected void portalLogout(HttpServletRequest request, HttpServletResponse response)
  8. {
  9. // Workaround: we need to temporary "restore" session to enforce crossContext logout at WCI layer
  10. request.getSession(true);
  11. try
  12. {
  13. ServletContainerFactory.getServletContainer().logout(request, response);
  14. }
  15. catch (Exception e)
  16. {
  17. String message = "Session has been invalidated but WCI logout failed.";
  18. log.warn(message);
  19. if (log.isTraceEnabled())
  20. {
  21. log.trace(message, e);
  22. }
  23. }
  24. }

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

  1. @Override
  2. public void invoke(Request request, Response response) throws IOException, ServletException
  3. {
  4. ServletAccess.setRequestAndResponse(request, response);
  5. if (log.isTraceEnabled())
  6. {
  7. log.trace("Current HttpServletRequest and HttpServletResponse added to ThreadLocal.");
  8. }
  9. try
  10. {
  11. getNext().invoke(request, response);
  12. }
  13. finally
  14. {
  15. ServletAccess.resetRequestAndResponse();
  16. if (log.isTraceEnabled())
  17. {
  18. log.trace("Cleaning ThreadLocal");
  19. }
  20. }
  21. }

代码示例来源:origin: gatein/gatein-portal

  1. log.info("Running unit test:" + getName());
  2. for (Map.Entry<?, ?> entry : System.getProperties().entrySet()) {
  3. if (entry.getKey() instanceof String) {
  4. String key = (String) entry.getKey();
  5. log.debug(key + "=" + entry.getValue());
  6. super.runBare();
  7. } catch (Throwable throwable) {
  8. log.error("Unit test " + getName() + " did not complete", throwable);

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

  1. public void endRequest(ExoContainer container) {
  2. if (!acceptComponentRequestCall)
  3. return;
  4. if (configuration.isUseJTA()) {
  5. if (traceLoggingEnabled) {
  6. log.trace("Finishing UserTransaction in method endRequest");
  7. }
  8. try {
  9. jtaTransactionLifecycleService.finishJTATransaction();
  10. } catch (Exception e) {
  11. log.error(e.getMessage(), e);
  12. }
  13. } else {
  14. try {
  15. if (idmService_.getIdentitySession().getTransaction().isActive()) {
  16. idmService_.getIdentitySession().getTransaction().commit();
  17. }
  18. } catch (Exception e) {
  19. log.error(e.getMessage(), e);
  20. recoverFromIDMError(e);
  21. }
  22. }
  23. }

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

  1. log.info("PortletInvoker with id: " + invokerId + " was skipped because it isn't active.");
  2. continue;
  3. log.debug(e.fillInStackTrace());
  4. log.warn("PortletInvoker with id: " + invokerId + " is not available.\nReason: " + e.getMessage()
  5. + "\nCaused by:\n" + (cause == null ? e : cause));

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

  1. public void stop()
  2. {
  3. // Wait at most 60 seconds before all invocations are done
  4. log.debug("Trying to close the valve");
  5. boolean done = valve.closing(60000);
  6. if (!done)
  7. {
  8. log.warn("The valve is still holding invocations, continue anyway");
  9. }
  10. //
  11. valve.closed();
  12. //
  13. status = LifeCycleStatus.CREATED;
  14. // Destroy the portlet object
  15. destroyPortlet(portlet);
  16. }

代码示例来源:origin: gatein/gatein-portal

  1. private Enumeration<URL> getResourceURLs(Set<String> paths) throws IOException {
  2. ArrayList<URL> urls = new ArrayList<URL>();
  3. for (String path : paths) {
  4. ArrayList<URL> resourceURLs = Collections.list(super.getResources(path));
  5. log.info("Want to load for resource named " + path + " the urls " + resourceURLs);
  6. urls.addAll(resourceURLs);
  7. }
  8. return Collections.enumeration(urls);
  9. }
  10. }

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

  1. public final Group createGroupInstance() {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "createGroupInstance", null);
  4. }
  5. return new ExtGroup();
  6. }

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

  1. public final void closeContext(boolean save)
  2. {
  3. log.trace("Requesting for context close with save=" + save + " going to look for any context");
  4. AbstractContext context = (AbstractContext)getContext(true);
  5. //
  6. if (context == null)
  7. {
  8. String msg = "Cannot close non existing context";
  9. log.trace(msg);
  10. throw new IllegalStateException(msg);
  11. }
  12. //
  13. context.close(save);
  14. }

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

  1. private SamlCredential getSamlCredential()
  2. {
  3. Subject subj = getCurrentSubject();
  4. if (log.isTraceEnabled())
  5. {
  6. log.trace("Found subject " + subj);
  7. }
  8. if (subj == null)
  9. {
  10. return null;
  11. }
  12. Set<Object> credentials = subj.getPublicCredentials();
  13. for (Object credential : credentials)
  14. {
  15. if (credential instanceof SamlCredential)
  16. {
  17. return (SamlCredential)credential;
  18. }
  19. }
  20. return null;
  21. }

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

  1. public void flush() {
  2. if (configuration.isUseJTA()) {
  3. if (traceLoggingEnabled) {
  4. log.trace("Flushing UserTransaction in method flush");
  5. }
  6. // Complete restart of JTA transaction don't have good performance. So we will only sync identitySession (same
  7. // as for non-jta environment)
  8. // finishJTATransaction();
  9. // beginJTATransaction();
  10. try {
  11. if (jtaTransactionLifecycleService.getUserTransaction().getStatus() == Status.STATUS_ACTIVE) {
  12. idmService_.getIdentitySession().save();
  13. }
  14. } catch (Exception e) {
  15. log.error(e.getMessage(), e);
  16. }
  17. } else {
  18. try {
  19. if (idmService_.getIdentitySession().getTransaction().isActive()) {
  20. idmService_.getIdentitySession().save();
  21. }
  22. } catch (Exception e) {
  23. log.error(e.getMessage(), e);
  24. recoverFromIDMError(e);
  25. }
  26. }
  27. }

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

  1. @Override
  2. protected void initImpl()
  3. {
  4. super.initImpl();
  5. try
  6. {
  7. // Lookup for JOSSO agent
  8. jossoAgent = JOSSOUtils.lookupSSOAgent();
  9. // If logoutURL not provided from filter configuration, fallback to obtain it from JOSSO agent
  10. if (logoutUrl == null || logoutUrl.length() == 0)
  11. {
  12. logoutUrl = jossoAgent.getGatewayLogoutUrl().trim();
  13. log.info("Obtained logoutUrl from configuration of josso agent. logoutUrl: " + this.logoutUrl);
  14. }
  15. }
  16. catch (Exception e)
  17. {
  18. log.warn("Can't obtain JOSSO agent", e);
  19. }
  20. }

代码示例来源: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. }

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

  1. protected void initImpl()
  2. {
  3. this.loginUrl = getInitParameter("LOGIN_URL");
  4. log.info("Filter configuration: loginUrl=" + loginUrl);
  5. }

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

  1. public void createGroup(Group group, boolean broadcast) throws Exception {
  2. if (log.isTraceEnabled()) {
  3. Tools.logMethodIn(log, LogLevel.TRACE, "createGroup", new Object[] { "broadcast", broadcast });
  4. }
  5. addChild(null, group, broadcast);
  6. }

相关文章