Package org.apache.log4j.lf5

Examples of org.apache.log4j.lf5.LogRecord


    } else {
      setBackground(Color.white);
    }

    FilteredLogTableModel model = (FilteredLogTableModel) table.getModel();
    LogRecord record = model.getFilteredRecord(row);

    setForeground(getLogLevelColor(record.getLevel()));

    return (super.getTableCellRendererComponent(table,
        value,
        isSelected,
        hasFocus,
View Full Code Here


/*     */     try
/*     */     {
/* 109 */       String logRecords = loadLogFile(this._in);
/*     */
/* 111 */       while ((counter = logRecords.indexOf("[slf5s.start]", index)) != -1) {
/* 112 */         LogRecord temp = createLogRecord(logRecords.substring(index, counter));
/* 113 */         isLogFile = true;
/*     */
/* 115 */         if (temp != null) {
/* 116 */           this._monitor.addMessage(temp);
/*     */         }
/*     */
/* 119 */         index = counter + "[slf5s.start]".length();
/*     */       }
/*     */
/* 122 */       if ((index < logRecords.length()) && (isLogFile)) {
/* 123 */         LogRecord temp = createLogRecord(logRecords.substring(index));
/*     */
/* 125 */         if (temp != null) {
/* 126 */           this._monitor.addMessage(temp);
/*     */         }
/*     */       }
View Full Code Here

/*     */   private LogRecord createLogRecord(String record) {
/* 261 */     if ((record == null) || (record.trim().length() == 0)) {
/* 262 */       return null;
/*     */     }
/*     */
/* 265 */     LogRecord lr = new Log4JLogRecord();
/* 266 */     lr.setMillis(parseDate(record));
/* 267 */     lr.setLevel(parsePriority(record));
/* 268 */     lr.setCategory(parseCategory(record));
/* 269 */     lr.setLocation(parseLocation(record));
/* 270 */     lr.setThreadDescription(parseThread(record));
/* 271 */     lr.setNDC(parseNDC(record));
/* 272 */     lr.setMessage(parseMessage(record));
/* 273 */     lr.setThrownStackTrace(parseThrowable(record));
/*     */
/* 275 */     return lr;
/*     */   }
View Full Code Here

/*     */   public int getTotalRowCount() {
/*  99 */     return this._allRecords.size();
/*     */   }
/*     */
/*     */   public Object getValueAt(int row, int col) {
/* 103 */     LogRecord record = getFilteredRecord(row);
/* 104 */     return getColumn(col, record);
/*     */   }
View Full Code Here

/*     */   protected List createFilteredRecordsList() {
/* 163 */     List result = new ArrayList();
/* 164 */     Iterator records = this._allRecords.iterator();
/*     */
/* 166 */     while (records.hasNext()) {
/* 167 */       LogRecord current = (LogRecord)records.next();
/* 168 */       if (this._filter.passes(current)) {
/* 169 */         result.add(current);
/*     */       }
/*     */     }
/* 172 */     return result;
View Full Code Here

/*    */     else {
/* 68 */       setBackground(Color.white);
/*    */     }
/*    */
/* 71 */     FilteredLogTableModel model = (FilteredLogTableModel)table.getModel();
/* 72 */     LogRecord record = model.getFilteredRecord(row);
/*    */
/* 74 */     setForeground(getLogLevelColor(record.getLevel()));
/*    */
/* 76 */     return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);
/*    */   }
View Full Code Here

    _configurationManager = new ConfigurationManager(this, _table);

  }

  protected LogRecordFilter createLogRecordFilter() {
    LogRecordFilter result = new LogRecordFilter() {
      public boolean passes(LogRecord record) {
        CategoryPath path = new CategoryPath(record.getCategory());
        return
            getMenuItem(record.getLevel()).isSelected() &&
            _categoryExplorerTree.getExplorerModel().isCategoryPathActive(path);
View Full Code Here

  // Added in version 1.2 - Creates a new filter that sorts records based on
  // an NDC string passed in by the user.
  protected LogRecordFilter createNDCLogRecordFilter(String text) {
    _NDCTextFilter = text;
    LogRecordFilter result = new LogRecordFilter() {
      public boolean passes(LogRecord record) {
        String NDC = record.getNDC();
        CategoryPath path = new CategoryPath(record.getCategory());
        if (NDC == null || _NDCTextFilter == null) {
          return false;
View Full Code Here

    _configurationManager = new ConfigurationManager(this, _table);

  }

  protected LogRecordFilter createLogRecordFilter() {
    LogRecordFilter result = new LogRecordFilter() {
      public boolean passes(LogRecord record) {
        CategoryPath path = new CategoryPath(record.getCategory());
        return
            getMenuItem(record.getLevel()).isSelected() &&
            _categoryExplorerTree.getExplorerModel().isCategoryPathActive(path);
View Full Code Here

  // Added in version 1.2 - Creates a new filter that sorts records based on
  // an NDC string passed in by the user.
  protected LogRecordFilter createNDCLogRecordFilter(String text) {
    _NDCTextFilter = text;
    LogRecordFilter result = new LogRecordFilter() {
      public boolean passes(LogRecord record) {
        String NDC = record.getNDC();
        CategoryPath path = new CategoryPath(record.getCategory());
        if (NDC == null || _NDCTextFilter == null) {
          return false;
View Full Code Here

TOP

Related Classes of org.apache.log4j.lf5.LogRecord

Copyright © 2018 www.massapicom. 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.