Examples of LogMessage


Examples of org.bladerunnerjs.testing.utility.LogMessage

 
 
  @Test /* 6A. we enable logging for something that logs at error level, and forget to make any assertions */
  @ExpectedFailure("Test should have failed since there were log messages that werent asserted")
  public void testFailsWhenWeEnabledLogingAndErrorMessageLoggedButNoAssertions() {
    expectFailureTypeAndMessage(AssertionError.class, LogMessageStore.UNEXPECTED_LOG_MESSAGES, "error", new LogMessage(LOG_MESSAGE_ONE_PARAM, PARAM1 ) );
   
    given(logging).enabled();
    logCommander.whenErrorMessageLogged(LOG_MESSAGE_ONE_PARAM, PARAM1);
  }
View Full Code Here

Examples of org.jboss.as.quickstarts.cmt.model.LogMessage

    @PersistenceContext
    private EntityManager entityManager;

    @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
    public void logCreateCustomer(String name) throws RemoteException, JMSException {
        LogMessage lm = new LogMessage();
        lm.setMessage("Attempt to create record for customer: '" + name + "'");
        entityManager.persist(lm);
    }
View Full Code Here

Examples of org.jboss.cdi.tck.tests.context.jms.LogStore.LogMessage

            }
        }).start();

        List<LogMessage> logMessages = store.getLogMessages();
        assertEquals(logMessages.size(), 2);
        LogMessage msg1 = logMessages.get(0);
        assertEquals(msg1.getText(), SimpleMessageProducer.class.getName());
        LogMessage msg2 = logMessages.get(1);
        assertEquals(msg2.getText(), SimpleMessageProducer.class.getName());
        // Test that each message delivery has its own request context
        assertFalse(msg1.getServiceId().equals(msg2.getServiceId()));
    }
View Full Code Here

Examples of org.jitterbit.plugin.sdk.LogMessage

        writeFileOrigin(file, xml);
        xml.closeElement();
    }
   
    private void writeFileLog(OutputFile file, XmlStringBuilder xml) {
        LogMessage log = file.getLogMessage();
        if (log != null) {
            writeLogMessage(log, xml);
        }
    }
View Full Code Here

Examples of org.jwall.log.LogMessage

    String line = reader.readLine();
    if( line == null )
      return null;

    try {
      LogMessage msg = parser.parse( line );
      return msg;
    } catch (Exception e) {
      throw new IOException( e.getMessage() );
    }
  }
View Full Code Here

Examples of org.wso2.carbon.logging.service.data.LogMessage

      for (int i = 0; i < objects.length; i++) {
        LoggingEvent logEvt = (LoggingEvent) objects[i];
        if (logEvt != null) {
          String result = layout.format(logEvt);
          if (result != null && result.toLowerCase().indexOf(keyword.toLowerCase()) > -1) {
            resultList.add(new LogMessage(result, logEvt.getLevel().toString()));
          }
        }
      }
      if (resultList.isEmpty()) {
        return NO_LOGS_MESSAGE;
      }
      return resultList.toArray(new LogMessage[resultList.size()]);
    } else {
      return new LogMessage[] { new LogMessage(
          "The log must be configured to use the "
              + "org.wso2.carbon.logging.appenders.MemoryAppender to view entries on the admin console",
          "") };
    }
  }
View Full Code Here

Examples of repast.simphony.data.logging.LogMessage

     * @see org.apache.log4j.jdbc.JDBCAppender#getLogStatement(org.apache.log4j.spi.LoggingEvent)
     */
    @Override
    public String getLogStatement(LoggingEvent event) {

      LogMessage message = (LogMessage) event.getMessage();

      if (!wroteRunInformation) {
        writeRunInformation(getRunID(descriptor, getConnection()), getConnection());
      }

      PreparedStatement prepStat = getPreparedStatement();
      int index = 0;

      try {
        if (descriptor.isAddRunID()) {
          prepStat.setInt(++index, getRunID(descriptor, getConnection()));
        }

        Iterator<String> columns = descriptor.getColumns().iterator();
        while (columns.hasNext()) {
          String column = columns.next();
          addToPrepStatet(prepStat, ++index, message.get(column));
        }
        prepStat.addBatch();

        if (descriptor.getWriteCacheInterval() == cached) {
          // the number of records to cache is reached -> execute statement
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.