Examples of LogEntry


Examples of ch.inftec.ju.fx.Log4jAppenderViewModel.LogEntry

        final Log4jAppenderViewModel viewModel = new Log4jAppenderViewModel(model);
       
        // Log to a logger that was added
        l1.info("Test1");
       
        final LogEntry e1 = viewModel.getLogEntries().get(0);
        Assert.assertEquals("Test1", e1.getMessage());
        Assert.assertEquals("INFO", e1.getLevel());
        Assert.assertNotNull(e1.getIcon());
        Assert.assertNotNull(e1.getImageView());
        Assert.assertEquals("l1", e1.getLoggerName());
       
        Thread t = new Thread(new Runnable() {
          @Override
          public void run() {
            l1.info("Test2");
          }
        });
        t.start();
        ThreadUtils.join(t);
       
        // We need to run this later, otherwise it won't be visible
        JuFxUtils.runInFxThread(new Runnable() {
          @Override
          public void run() {
            Assert.assertEquals(2, viewModel.getLogEntries().size());
            LogEntry e2 = viewModel.getLogEntries().get(0);
            Assert.assertEquals("Test2", e2.getMessage());
            Assert.assertFalse(e1.getThreadName().equals(e2.getThreadName()));
          }
        }, true);
      }
    });
  }
View Full Code Here

Examples of ch.njol.skript.log.LogEntry

   *
   * @param error
   * @param quality
   */
  public static void error(final String error, final ErrorQuality quality) {
    SkriptLogger.log(new LogEntry(SkriptLogger.SEVERE, quality, error));
  }
View Full Code Here

Examples of com.facebook.nifty.test.LogEntry

    public void testMethodCalls()
            throws Exception
    {
        startServer();
        scribe.Client client = makeClient();
        client.Log(Arrays.asList(new LogEntry("hello", "world")));
    }
View Full Code Here

Examples of com.facebook.swift.service.LogEntry

        TestServerInfo info = startServer();
        ThriftClientManager clientManager = new ThriftClientManager();

        try (Scribe client = createUnframedClient(clientManager, Scribe.class, info.port).get()) {
            ResultCode result = client.log(Lists.newArrayList(
                    new LogEntry("testCategory", "testMessage")));
            assertEquals(result, ResultCode.OK);
        }

        stopServer(info);
    }
View Full Code Here

Examples of com.facebook.swift.service.scribe.LogEntry

    private List<LogEntry> testProcessor(NiftyProcessor processor)
            throws Exception
    {
        ImmutableList<LogEntry> messages = ImmutableList.of(
                new LogEntry("hello", "world"),
                new LogEntry("bye", "world")
        );

        try (ThriftServer server = new ThriftServer(processor).start()) {
            assertEquals(logThrift(server.getPort(), messages), ResultCode.OK);
            assertEquals(logSwift(server.getPort(), toSwiftLogEntry(messages)), com.facebook.swift.service.ResultCode.OK);
View Full Code Here

Examples of com.sleepycat.je.log.entry.LogEntry

                serialLog(new LogItem[] { item }, lqeContext);
                lqe = lazyLogQueue.poll();
            }

            for (LogItem item : itemArray) {
                LogEntry logEntry = item.entry;

                /*
                 * Get the old size before marshaling, which updates it.
                 * Holding the log write latch is not necessary, because the
                 * parent IN latch prevents other threads from logging this
                 * node.
                 */
                item.oldSize = logEntry.getLastLoggedSize();

                /*
                 * If possible, marshall this entry outside the log write latch
                 * to allow greater concurrency by shortening the write
                 * critical section.  Note that the header may only be created
                 * during marshalling because it calls entry.getSize().
                 */
                if (logEntry.getLogType().marshallOutsideLatch()) {
                    item.header = new LogEntryHeader
                        (logEntry, item.provisional, item.repContext);
                    item.buffer = marshallIntoBuffer(item.header, logEntry);
                }
            }
View Full Code Here

Examples of com.sleepycat.je.log.entry.LogEntry

            assert LogEntryType.isValidType(header.getType()):
                "Read non-valid log entry type: " + header.getType();

            /* Read the entry. */
            LogEntry logEntry =
                LogEntryType.findType(header.getType()).getNewLogEntry();
            logEntry.readEntry(envImpl, header, entryBuffer);

            /* For testing only; generate a read io exception. */
            if (readHook != null) {
                try {
                    readHook.doIOHook();
View Full Code Here

Examples of com.sleepycat.je.log.entry.LogEntry

     * @return the object in the log
     */
    public Object getEntry(long lsn)
        throws FileNotFoundException, DatabaseException {

        LogEntry entry = getLogEntry(lsn);
        return entry.getMainItem();
    }
View Full Code Here

Examples of com.sleepycat.je.log.entry.LogEntry

        LogEntry entry = getLogEntry(lsn);
        return entry.getMainItem();
    }

    public Object getEntryHandleFileNotFound(long lsn) {
        LogEntry entry = getLogEntryHandleFileNotFound(lsn);
        return entry.getMainItem();
    }
View Full Code Here

Examples of com.sleepycat.je.log.entry.LogEntry

            } catch (ChecksumException e) {
                throw newVerifyException(e);
            }

            headerBuf.flip();
            LogEntry fileHeaderEntry =
                LogEntryType.LOG_FILE_HEADER.getNewLogEntry();
            fileHeaderEntry.readEntry(envImpl, header, headerBuf);
            FileHeader fileHeaderItem =
                (FileHeader) fileHeaderEntry.getMainItem();

            /* Log version in the file header applies to all other entries. */
            logVersion = fileHeaderItem.getLogVersion();

            entryStart += header.getSize() + maxSize;
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.