Examples of LogRecord


Examples of java.util.logging.LogRecord

        }
        for (JGDIBaseImpl jgdi : currentInstances) {
            try {
                jgdi.close();
            } catch (JGDIException ex) {
                LogRecord lr = new LogRecord(Level.FINE, "close of connection {0} failed");
                lr.setParameters(new Object[]{jgdi.ctxIndex});
                lr.setThrown(ex);
                log.log(lr);
            }
        }
    }
View Full Code Here

Examples of net.sourceforge.marathon.api.LogRecord

        showMessage.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int row = logTable.getSelectedRow();
                if (row == -1)
                    return;
                LogRecord record = logList.getRecordAt(row);
                showMessage(record);
            }
        });
        toolBar.add(showMessage);
        toolBar.add(clear);
View Full Code Here

Examples of org.apache.cxf.management.web.logging.LogRecord

            // instead we create a SearchCondition the external storage will check against when
            // loading the matching records on request
           
            List<SearchCondition<LogRecord>> list = new LinkedList<SearchCondition<LogRecord>>();
            for (LoggerLevel l : super.getLoggers()) {
                LogRecord r = new LogRecord();
                r.setLoggerName(l.getLogger());
                r.setLevel(LogLevel.valueOf(l.getLevel()));
                list.add(new SearchConditionImpl(r));
            }
            readableStorageCondition = list.size() == 0 ? null : new OrSearchCondition<LogRecord>(list);
        }
        initBusProperty();
View Full Code Here

Examples of org.apache.cxf.management.web.logging.LogRecord

            if (records.size() == maxInMemorySize) {
                if (storage instanceof ReadWriteLogStorage) {
                    ((ReadWriteLogStorage)storage).save(records);
                    records.clear();
                } else {
                    LogRecord oldRecord = records.remove(0);
                    System.err.println("The oldest log record is removed : " + oldRecord.toString());
                }
            }
            records.add(record);
            ++recordsSize;
        }
View Full Code Here

Examples of org.apache.cxf.management.web.logging.LogRecord

                   || pojo.getLevel().compareTo(template.getLevel()) <= 0)
                   && template.getLoggerName().equals(pojo.getLoggerName());
        }

        public LogRecord getCondition() {
            return new LogRecord(template);
        }
View Full Code Here

Examples of org.apache.derby.impl.store.raw.log.LogRecord

      int peekAmount = LogRecord.formatOverhead() + LogRecord.maxGroupStoredSize();
      if (tranId != null)
        peekAmount += LogRecord.maxTransactionIdStoredSize(tranId);
      int readAmount;    // the number of bytes actually read

      LogRecord lr;

      do
      {
        if (!open || !positionToNextRecord())
          return null;

        int checkLength;

        // this log record is a candidate unless proven otherwise
        lr = null;
        candidate = true;
        readAmount = -1;

        currentInstant = scan.readLong();
        byte[] data = input.getData();
        if (data.length < nextRecordLength)
        {
          // make a new array of sufficient size and reset the arrary
          // in the input stream
          data = new byte[nextRecordLength];
          input.setData(data);
        }

        if (logFactory.databaseEncrypted())
        {
          scan.readFully(data, 0, nextRecordLength);
          int len = logFactory.decrypt(data, 0, nextRecordLength, data, 0);
          if (SanityManager.DEBUG)
            SanityManager.ASSERT(len == nextRecordLength);
          input.setLimit(0, len);

        }
        else // no need to decrypt, only get the group and tid if we filter
        {
          if (groupmask == 0 && tranId == null)
          {
            // no filter, get the whole thing
            scan.readFully(data, 0, nextRecordLength);
            input.setLimit(0, nextRecordLength);
          }
          else
          {
            // Read only enough so that group and the tran id is in
            // the data buffer.  Group is stored as compressed int
            // and tran id is stored as who knows what.  read min
            // of peekAmount or nextRecordLength
            readAmount = (nextRecordLength > peekAmount) ?
              peekAmount : nextRecordLength;

            // in the data buffer, we now have enough to peek
            scan.readFully(data, 0, readAmount);
            input.setLimit(0, readAmount);

          }
        }

        lr = (LogRecord) input.readObject();

        if (groupmask != 0 || tranId != null)
        {
          if (groupmask != 0 && (groupmask & lr.group()) == 0)
            candidate = false; // no match, throw this log record out

          if (candidate && tranId != null)
          {
            TransactionId tid = lr.getTransactionId();
            if (!tid.equals(tranId)) // nomatch
              candidate = false; // throw this log record out
          }

          // if this log record is not filtered out, we need to read
View Full Code Here

Examples of org.apache.flume.channel.file.LogRecord

    for (File dataFile : files) {
      LogFile.SequentialReader reader =
        new LogFileV3.SequentialReader(dataFile, null, true);
      RandomAccessFile handle = new RandomAccessFile(dataFile, "rw");
      long eventPosition1 = reader.getPosition();
      LogRecord rec = reader.next();
      //No point corrupting commits, so ignore them
      if(rec == null ||
        rec.getEvent().getClass().getName().
          equals("org.apache.flume.channel.file.Commit")) {
        handle.close();
        reader.close();
        continue;
      }
      long eventPosition2 = reader.getPosition();
      rec = reader.next();
      handle.seek(eventPosition1 + 100);
      handle.writeInt(random.nextInt());
      corrupted++;
      corruptFiles.add(dataFile.getName());
      if (rec == null ||
        rec.getEvent().getClass().getName().
          equals("org.apache.flume.channel.file.Commit")) {
        handle.close();
        reader.close();
        continue;
      }
View Full Code Here

Examples of org.apache.flume.channel.file.LogRecord

              // Type, length, data.
              eventPosition = reader.getPosition();
              // Try to get the record, if the checksums don't match,
              // this will throw a CorruptEventException - so the real logic
              // is in the catch block below.
              LogRecord record = reader.next();
              if (record != null) {
                record.getEvent();
              } else {
                fileDone = true;
              }
            } catch (CorruptEventException e) {
              LOG.warn("Corruption found in " + dataFile.toString() + " at "
View Full Code Here

Examples of org.apache.log4j.lf5.LogRecord

  public int getTotalRowCount() {
    return _allRecords.size();
  }

  public Object getValueAt(int row, int col) {
    LogRecord record = getFilteredRecord(row);
    return getColumn(col, record);
  }
View Full Code Here

Examples of org.chaidb.db.log.LogRecord

    /**
     * Undo the transaction.
     */
    private void undo() throws ChaiDBException {
        Lsn keyLsn;
        LogRecord logRecord;

        keyLsn = this.lastLsn;
        if (keyLsn.equals(_INVALID_LSN)) return;
        logRecord = lnkTransactionManager.getLogManager().get(keyLsn);

        /* Allocate a transaction list for children or aborted page creates. */
        for (keyLsn = this.lastLsn; !keyLsn.equals(_INVALID_LSN); keyLsn = logRecord.getPrevLsn()) {
            logRecord = lnkTransactionManager.getLogManager().get(keyLsn);
            try {
                logRecord.recover(LogRecord.UNDO);
            } catch (ChaiDBException ie) {
                logger.error(ie);
                throw new ChaiDBException(ErrorCode.UNDO_FAILURE, ie);
            }

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.