Package ch.qos.logback.classic

Examples of ch.qos.logback.classic.Logger.error()


    smtpAppender.setLayout(buildPatternLayout(loggerContext));
    smtpAppender.start();
    Logger logger = loggerContext.getLogger("test");
    logger.addAppender(smtpAppender);
    logger.debug("hello");
    logger.error("en error", new Exception("an exception"));

    waitUntilEmailIsSent();
    System.out.println("*** " + ((ThreadPoolExecutor) loggerContext.getExecutorService()).getCompletedTaskCount());
    List<WiserMessage> wiserMsgList = WISER.getMessages();

View Full Code Here


    smtpAppender.setLayout(buildHTMLLayout(loggerContext));
    smtpAppender.start();
    Logger logger = loggerContext.getLogger("test");
    logger.addAppender(smtpAppender);
    logger.debug("hello");
    logger.error("en error", new Exception("an exception"));
    waitUntilEmailIsSent();

    List<WiserMessage> wiserMsgList = WISER.getMessages();

    assertNotNull(wiserMsgList);
View Full Code Here

    Logger logger = loggerContext.getLogger("test");
    logger.addAppender(smtpAppender);
    for (int i = 0; i < CoreConstants.TABLE_ROW_LIMIT * 3; i++) {
      logger.debug("hello " + i);
    }
    logger.error("en error", new Exception("an exception"));
    waitUntilEmailIsSent();
    List<WiserMessage> wiserMsgList = WISER.getMessages();

    assertNotNull(wiserMsgList);
    assertEquals(numberOfOldMessages + 1, wiserMsgList.size());
View Full Code Here

    smtpAppender.setLayout(buildPatternLayout(loggerContext));
    smtpAppender.start();
    Logger logger = loggerContext.getLogger("test");
    logger.addAppender(smtpAppender);
    logger.debug("hello");
    logger.error("en error", new Exception("an exception"));
    waitUntilEmailIsSent();
    List<WiserMessage> wiserMsgList = WISER.getMessages();

    assertNotNull(wiserMsgList);
    assertEquals(numberOfOldMessages + 1, wiserMsgList.size());
View Full Code Here

    smtpAppender.setLayout(buildPatternLayout(loggerContext));
    smtpAppender.start();
    Logger logger = loggerContext.getLogger("test");
    logger.addAppender(smtpAppender);
    logger.debug("hello");
    logger.error("en error", new Exception("an exception"));

    waitUntilEmailIsSent();
    List<WiserMessage> wiserMsgList = WISER.getMessages();

    assertNotNull(wiserMsgList);
View Full Code Here

    smtpAppender.setLayout(buildPatternLayout(loggerContext));
    smtpAppender.start();
    Logger logger = loggerContext.getLogger("authenticatedGmailSTARTTLS");
    logger.addAppender(smtpAppender);
    logger.debug("hello");
    logger.error("en error", new Exception("an exception"));

    StatusPrinter.print(loggerContext);
  }

  @Test
View Full Code Here

    smtpAppender.setLayout(buildPatternLayout(loggerContext));
    smtpAppender.start();
    Logger logger = loggerContext.getLogger("authenticatedGmail_SSL");
    logger.addAppender(smtpAppender);
    logger.debug("hello");
    logger.error("en error", new Exception("an exception"));

    StatusPrinter.print(loggerContext);
  }

  @Test
View Full Code Here

    smtpAppender.addTo("Test <test@example.com>, other-test@example.com");
    smtpAppender.start();
    Logger logger = loggerContext.getLogger("test");
    logger.addAppender(smtpAppender);
    logger.debug("hello");
    logger.error("en error", new Exception("an exception"));
    waitUntilEmailIsSent();

    List<WiserMessage> wiserMsgList = WISER.getMessages();
    assertNotNull(wiserMsgList);
    assertEquals(numberOfOldMessages + 3, wiserMsgList.size());
View Full Code Here

          try {
            final URL stopUrl = new URL (controllerBaseUrl, String.format ("/v1/processes/stop?key=%s", identifier));
            stopUrl.openStream ().close ();
          } catch (final Throwable exception) {
            exceptions.trace (ExceptionResolution.Ignored, exception);
            logger.error ("failed stopping component; ignoring!", exception);
          }
      }
    });
    logger.debug ("starting main...");
    final Thread main = Threading.createDaemonThread (threading, BasicComponentGenericLauncher.class, "main", run);
View Full Code Here

          final String identifier = (String) ((List<?>) createResponseMap.get ("keys")).get (0);
          Preconditions.checkNotNull (identifier);
          componentIdentifier.set (identifier);
        } catch (final Throwable exception) {
          exceptions.trace (ExceptionResolution.Ignored, exception);
          logger.error (String.format ("failed creating component: %s; ignoring!", createResponse), exception);
          throw (new Error (exception));
        }
      } catch (final Throwable exception) {
        exceptions.trace (ExceptionResolution.Ignored, exception);
        logger.error ("failed creating component; ignoring!", exception);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.