com.crashlytics.tools.android_2.1.0

rd record)
  {
    return true;
  }
  
  public void reset() {}
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.PassingLogRecordFilter
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5;

import org.apache.log4j.lf5.viewer.LogBrokerMonitor;

public class StartLogFactor5
{
  public static final void main(String[] args)
  {
    LogBrokerMonitor monitor = new LogBrokerMonitor(LogLevel.getLog4JLevels());
    
    monitor.setFrameSize(LF5Appender.getDefaultMonitorWidth(), LF5Appender.getDefaultMonitorHeight());
    
    monitor.setFontSize(12);
    monitor.show();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.StartLogFactor5
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

import java.io.PrintWriter;
import java.io.StringWriter;
import org.apache.log4j.lf5.LogLevel;
import org.apache.log4j.lf5.LogRecord;

public class AdapterLogRecord
  extends LogRecord
{
  private static LogLevel severeLevel = null;
  private static StringWriter sw = new StringWriter();
  private static PrintWriter pw = new PrintWriter(sw);
  
  public void setCategory(String category)
  {
    super.setCategory(category);
    super.setLocation(getLocationInfo(category));
  }
  
  public boolean isSevereLevel()
  {
    if (severeLevel == null) {
      return false;
    }
    return severeLevel.equals(getLevel());
  }
  
  public static void setSevereLevel(LogLevel level)
  {
    severeLevel = level;
  }
  
  public static LogLevel getSevereLevel()
  {
    return severeLevel;
  }
  
  protected String getLocationInfo(String category)
  {
    String stackTrace = stackTraceToString(new Throwable());
    String line = parseLine(stackTrace, category);
    return line;
  }
  
  protected String stackTraceToString(Throwable t)
  {
    String s = null;
    synchronized (sw)
    {
      t.printStackTrace(pw);
      s = sw.toString();
      sw.getBuffer().setLength(0);
    }
    return s;
  }
  
  protected String parseLine(String trace, String category)
  {
    int index = trace.indexOf(category);
    if (index == -1) {
      return null;
    }
    trace = trace.substring(index);
    trace = trace.substring(0, trace.indexOf(")") + 1);
    return trace;
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.AdapterLogRecord
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

public class DateFormatManager
{
  private TimeZone _timeZone = null;
  private Locale _locale = null;
  private String _pattern = null;
  private DateFormat _dateFormat = null;
  
  public DateFormatManager()
  {
    configure();
  }
  
  public DateFormatManager(TimeZone timeZone)
  {
    _timeZone = timeZone;
    configure();
  }
  
  public DateFormatManager(Locale locale)
  {
    _locale = locale;
    configure();
  }
  
  public DateFormatManager(String pattern)
  {
    _pattern = pattern;
    configure();
  }
  
  public DateFormatManager(TimeZone timeZone, Locale locale)
  {
    _timeZone = timeZone;
    _locale = locale;
    configure();
  }
  
  public DateFormatManager(TimeZone timeZone, String pattern)
  {
    _timeZone = timeZone;
    _pattern = pattern;
    configure();
  }
  
  public DateFormatManager(Locale locale, String pattern)
  {
    _locale = locale;
    _pattern = pattern;
    configure();
  }
  
  public DateFormatManager(TimeZone timeZone, Locale locale, String pattern)
  {
    _timeZone = timeZone;
    _locale = locale;
    _pattern = pattern;
    configure();
  }
  
  public synchronized TimeZone getTimeZone()
  {
    if (_timeZone == null) {
      return TimeZone.getDefault();
    }
    return _timeZone;
  }
  
  public synchronized void setTimeZone(TimeZone timeZone)
  {
    _timeZone = timeZone;
    configure();
  }
  
  public synchronized Locale getLocale()
  {
    if (_locale == null) {
      return Locale.getDefault();
    }
    return _locale;
  }
  
  public synchronized void setLocale(Locale locale)
  {
    _locale = locale;
    configure();
  }
  
  public synchronized String getPattern()
  {
    return _pattern;
  }
  
  public synchronized void setPattern(String pattern)
  {
    _pattern = pattern;
    configure();
  }
  
  /**
   * @deprecated
   */
  public synchronized String getOutputFormat()
  {
    return _pattern;
  }
  
  /**
   * @deprecated
   */
  public synchronized void setOutputFormat(String pattern)
  {
    _pattern = pattern;
    configure();
  }
  
  public synchronized DateFormat getDateFormatInstance()
  {
    return _dateFormat;
  }
  
  public synchronized void setDateFormatInstance(DateFormat dateFormat)
  {
    _dateFormat = dateFormat;
  }
  
  public String format(Date date)
  {
    return getDateFormatInstance().format(date);
  }
  
  public String format(Date date, String pattern)
  {
    DateFormat formatter = null;
    formatter = getDateFormatInstance();
    if ((formatter instanceof SimpleDateFormat))
    {
      formatter = (SimpleDateFormat)formatter.clone();
      ((SimpleDateFormat)formatter).applyPattern(pattern);
    }
    return formatter.format(date);
  }
  
  public Date parse(String date)
    throws ParseException
  {
    return getDateFormatInstance().parse(date);
  }
  
  public Date parse(String date, String pattern)
    throws ParseException
  {
    DateFormat formatter = null;
    formatter = getDateFormatInstance();
    if ((formatter instanceof SimpleDateFormat))
    {
      formatter = (SimpleDateFormat)formatter.clone();
      ((SimpleDateFormat)formatter).applyPattern(pattern);
    }
    return formatter.parse(date);
  }
  
  private synchronized void configure()
  {
    _dateFormat = SimpleDateFormat.getDateTimeInstance(0, 0, getLocale());
    
    _dateFormat.setTimeZone(getTimeZone());
    if (_pattern != null) {
      ((SimpleDateFormat)_dateFormat).applyPattern(_pattern);
    }
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.DateFormatManager
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

class LogFileParser$1
  implements Runnable
{
  private final LogFileParser this$0;
  
  LogFileParser$1(LogFileParser paramLogFileParser) {}
  
  public void run()
  {
    LogFileParser.access$000(this$0);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.LogFileParser.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.SwingUtilities;
import org.apache.log4j.lf5.Log4JLogRecord;
import org.apache.log4j.lf5.LogLevel;
import org.apache.log4j.lf5.LogLevelFormatException;
import org.apache.log4j.lf5.LogRecord;
import org.apache.log4j.lf5.viewer.LogBrokerMonitor;
import org.apache.log4j.lf5.viewer.LogFactor5ErrorDialog;
import org.apache.log4j.lf5.viewer.LogFactor5LoadingDialog;

public class LogFileParser
  implements Runnable
{
  public static final String RECORD_DELIMITER = "[slf5s.start]";
  public static final String ATTRIBUTE_DELIMITER = "[slf5s.";
  public static final String DATE_DELIMITER = "[slf5s.DATE]";
  public static final String THREAD_DELIMITER = "[slf5s.THREAD]";
  public static final String CATEGORY_DELIMITER = "[slf5s.CATEGORY]";
  public static final String LOCATION_DELIMITER = "[slf5s.LOCATION]";
  public static final String MESSAGE_DELIMITER = "[slf5s.MESSAGE]";
  public static final String PRIORITY_DELIMITER = "[slf5s.PRIORITY]";
  public static final String NDC_DELIMITER = "[slf5s.NDC]";
  private static SimpleDateFormat _sdf = new SimpleDateFormat("dd MMM yyyy HH:mm:ss,S");
  private LogBrokerMonitor _monitor;
  LogFactor5LoadingDialog _loadDialog;
  private InputStream _in = null;
  
  public LogFileParser(File file)
    throws IOException, FileNotFoundException
  {
    this(new FileInputStream(file));
  }
  
  public LogFileParser(InputStream stream)
    throws IOException
  {
    _in = stream;
  }
  
  public void parse(LogBrokerMonitor monitor)
    throws RuntimeException
  {
    _monitor = monitor;
    Thread t = new Thread(this);
    t.start();
  }
  
  public void run()
  {
    int index = 0;
    int counter = 0;
    
    boolean isLogFile = false;
    
    _loadDialog = new LogFactor5LoadingDialog(_monitor.getBaseFrame(), "Loading file...");
    try
    {
      String logRecords = loadLogFile(_in);
      while ((counter = logRecords.indexOf("[slf5s.start]", index)) != -1)
      {
        LogRecord temp = createLogRecord(logRecords.substring(index, counter));
        isLogFile = true;
        if (temp != null) {
          _monitor.addMessage(temp);
        }
        index = counter + "[slf5s.start]".length();
      }
      if ((index < logRecords.length()) && (isLogFile))
      {
        LogRecord temp = createLogRecord(logRecords.substring(index));
        if (temp != null) {
          _monitor.addMessage(temp);
        }
      }
      if (!isLogFile) {
        throw new RuntimeException("Invalid log file format");
      }
      SwingUtilities.invokeLater(new Runnable()
      {
        public void run()
        {
          LogFileParser.this.destroyDialog();
        }
      });
    }
    catch (RuntimeException e)
    {
      destroyDialog();
      displayError("Error - Invalid log file format.\nPlease see documentation on how to load log files.");
    }
    catch (IOException e)
    {
      destroyDialog();
      displayError("Error - Unable to load log file!");
    }
    _in = null;
  }
  
  protected void displayError(String message)
  {
    LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(_monitor.getBaseFrame(), message);
  }
  
  private void destroyDialog()
  {
    _loadDialog.hide();
    _loadDialog.dispose();
  }
  
  private String loadLogFile(InputStream stream)
    throws IOException
  {
    BufferedInputStream br = new BufferedInputStream(stream);
    
    int count = 0;
    int size = br.available();
    
    StringBuffer sb = null;
    if (size > 0) {
      sb = new StringBuffer(size);
    } else {
      sb = new StringBuffer(1024);
    }
    while ((count = br.read()) != -1) {
      sb.append((char)count);
    }
    br.close();
    br = null;
    return sb.toString();
  }
  
  private String parseAttribute(String name, String record)
  {
    int index = record.indexOf(name);
    if (index == -1) {
      return null;
    }
    return getAttribute(index, record);
  }
  
  private long parseDate(String record)
  {
    try
    {
      String s = parseAttribute("[slf5s.DATE]", record);
      if (s == null) {
        return 0L;
      }
      Date d = _sdf.parse(s);
      
      return d.getTime();
    }
    catch (ParseException e) {}
    return 0L;
  }
  
  private LogLevel parsePriority(String record)
  {
    String temp = parseAttribute("[slf5s.PRIORITY]", record);
    if (temp != null) {
      try
      {
        return LogLevel.valueOf(temp);
      }
      catch (LogLevelFormatException e)
      {
        return LogLevel.DEBUG;
      }
    }
    return LogLevel.DEBUG;
  }
  
  private String parseThread(String record)
  {
    return parseAttribute("[slf5s.THREAD]", record);
  }
  
  private String parseCategory(String record)
  {
    return parseAttribute("[slf5s.CATEGORY]", record);
  }
  
  private String parseLocation(String record)
  {
    return parseAttribute("[slf5s.LOCATION]", record);
  }
  
  private String parseMessage(String record)
  {
    return parseAttribute("[slf5s.MESSAGE]", record);
  }
  
  private String parseNDC(String record)
  {
    return parseAttribute("[slf5s.NDC]", record);
  }
  
  private String parseThrowable(String record)
  {
    return getAttribute(record.length(), record);
  }
  
  private LogRecord createLogRecord(String record)
  {
    if ((record == null) || (record.trim().length() == 0)) {
      return null;
    }
    LogRecord lr = new Log4JLogRecord();
    lr.setMillis(parseDate(record));
    lr.setLevel(parsePriority(record));
    lr.setCategory(parseCategory(record));
    lr.setLocation(parseLocation(record));
    lr.setThreadDescription(parseThread(record));
    lr.setNDC(parseNDC(record));
    lr.setMessage(parseMessage(record));
    lr.setThrownStackTrace(parseThrowable(record));
    
    return lr;
  }
  
  private String getAttribute(int index, String record)
  {
    int start = record.lastIndexOf("[slf5s.", index - 1);
    if (start == -1) {
      return record.substring(0, index);
    }
    start = record.indexOf("]", start);
    
    return record.substring(start + 1, index).trim();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.LogFileParser
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.util.Arrays;
import java.util.List;
import org.apache.log4j.lf5.LogLevel;
import org.apache.log4j.lf5.LogRecord;
import org.apache.log4j.lf5.viewer.LogBrokerMonitor;

public class LogMonitorAdapter
{
  public static final int LOG4J_LOG_LEVELS = 0;
  public static final int JDK14_LOG_LEVELS = 1;
  private LogBrokerMonitor _logMonitor;
  private LogLevel _defaultLevel = null;
  
  private LogMonitorAdapter(List userDefinedLevels)
  {
    _defaultLevel = ((LogLevel)userDefinedLevels.get(0));
    _logMonitor = new LogBrokerMonitor(userDefinedLevels);
    
    _logMonitor.setFrameSize(getDefaultMonitorWidth(), getDefaultMonitorHeight());
    
    _logMonitor.setFontSize(12);
    _logMonitor.show();
  }
  
  public static LogMonitorAdapter newInstance(int loglevels)
  {
    LogMonitorAdapter adapter;
    if (loglevels == 1)
    {
      LogMonitorAdapter adapter = newInstance(LogLevel.getJdk14Levels());
      adapter.setDefaultLevel(LogLevel.FINEST);
      adapter.setSevereLevel(LogLevel.SEVERE);
    }
    else
    {
      adapter = newInstance(LogLevel.getLog4JLevels());
      adapter.setDefaultLevel(LogLevel.DEBUG);
      adapter.setSevereLevel(LogLevel.FATAL);
    }
    return adapter;
  }
  
  public static LogMonitorAdapter newInstance(LogLevel[] userDefined)
  {
    if (userDefined == null) {
      return null;
    }
    return newInstance(Arrays.asList(userDefined));
  }
  
  public static LogMonitorAdapter newInstance(List userDefinedLevels)
  {
    return new LogMonitorAdapter(userDefinedLevels);
  }
  
  public void addMessage(LogRecord record)
  {
    _logMonitor.addMessage(record);
  }
  
  public void setMaxNumberOfRecords(int maxNumberOfRecords)
  {
    _logMonitor.setMaxNumberOfLogRecords(maxNumberOfRecords);
  }
  
  public void setDefaultLevel(LogLevel level)
  {
    _defaultLevel = level;
  }
  
  public LogLevel getDefaultLevel()
  {
    return _defaultLevel;
  }
  
  public void setSevereLevel(LogLevel level)
  {
    AdapterLogRecord.setSevereLevel(level);
  }
  
  public LogLevel getSevereLevel()
  {
    return AdapterLogRecord.getSevereLevel();
  }
  
  public void log(String category, LogLevel level, String message, Throwable t, String NDC)
  {
    AdapterLogRecord record = new AdapterLogRecord();
    record.setCategory(category);
    record.setMessage(message);
    record.setNDC(NDC);
    record.setThrown(t);
    if (level == null) {
      record.setLevel(getDefaultLevel());
    } else {
      record.setLevel(level);
    }
    addMessage(record);
  }
  
  public void log(String category, String message)
  {
    log(category, null, message);
  }
  
  public void log(String category, LogLevel level, String message, String NDC)
  {
    log(category, level, message, null, NDC);
  }
  
  public void log(String category, LogLevel level, String message, Throwable t)
  {
    log(category, level, message, t, null);
  }
  
  public void log(String category, LogLevel level, String message)
  {
    log(category, level, message, null, null);
  }
  
  protected static int getScreenWidth()
  {
    try
    {
      return getDefaultToolkitgetScreenSizewidth;
    }
    catch (Throwable t) {}
    return 800;
  }
  
  protected static int getScreenHeight()
  {
    try
    {
      return getDefaultToolkitgetScreenSizeheight;
    }
    catch (Throwable t) {}
    return 600;
  }
  
  protected static int getDefaultMonitorWidth()
  {
    return 3 * getScreenWidth() / 4;
  }
  
  protected static int getDefaultMonitorHeight()
  {
    return 3 * getScreenHeight() / 4;
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.LogMonitorAdapter
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;

public class Resource
{
  protected String _name;
  
  public Resource() {}
  
  public Resource(String name)
  {
    _name = name;
  }
  
  public void setName(String name)
  {
    _name = name;
  }
  
  public String getName()
  {
    return _name;
  }
  
  public InputStream getInputStream()
  {
    InputStream in = ResourceUtils.getResourceAsStream(this, this);
    
    return in;
  }
  
  public InputStreamReader getInputStreamReader()
  {
    InputStream in = ResourceUtils.getResourceAsStream(this, this);
    if (in == null) {
      return null;
    }
    InputStreamReader reader = new InputStreamReader(in);
    
    return reader;
  }
  
  public URL getURL()
  {
    return ResourceUtils.getResourceAsURL(this, this);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.Resource
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

import java.io.InputStream;
import java.net.URL;

public class ResourceUtils
{
  public static InputStream getResourceAsStream(Object object, Resource resource)
  {
    ClassLoader loader = object.getClass().getClassLoader();
    
    InputStream in = null;
    if (loader != null) {
      in = loader.getResourceAsStream(resource.getName());
    } else {
      in = ClassLoader.getSystemResourceAsStream(resource.getName());
    }
    return in;
  }
  
  public static URL getResourceAsURL(Object object, Resource resource)
  {
    ClassLoader loader = object.getClass().getClassLoader();
    
    URL url = null;
    if (loader != null) {
      url = loader.getResource(resource.getName());
    } else {
      url = ClassLoader.getSystemResource(resource.getName());
    }
    return url;
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.ResourceUtils
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.util;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public abstract class StreamUtils
{
  public static final int DEFAULT_BUFFER_SIZE = 2048;
  
  public static void copy(InputStream input, OutputStream output)
    throws IOException
  {
    copy(input, output, 2048);
  }
  
  public static void copy(InputStream input, OutputStream output, int bufferSize)
    throws IOException
  {
    byte[] buf = new byte[bufferSize];
    int bytesRead = input.read(buf);
    while (bytesRead != -1)
    {
      output.write(buf, 0, bytesRead);
      bytesRead = input.read(buf);
    }
    output.flush();
  }
  
  public static void copyThenClose(InputStream input, OutputStream output)
    throws IOException
  {
    copy(input, output);
    input.close();
    output.close();
  }
  
  public static byte[] getBytes(InputStream input)
    throws IOException
  {
    ByteArrayOutputStream result = new ByteArrayOutputStream();
    copy(input, result);
    result.close();
    return result.toByteArray();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.util.StreamUtils
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import javax.swing.table.AbstractTableModel;
import org.apache.log4j.lf5.LogRecord;
import org.apache.log4j.lf5.LogRecordFilter;
import org.apache.log4j.lf5.PassingLogRecordFilter;

public class FilteredLogTableModel
  extends AbstractTableModel
{
  protected LogRecordFilter _filter = new PassingLogRecordFilter();
  protected List _allRecords = new ArrayList();
  protected List _filteredRecords;
  protected int _maxNumberOfLogRecords = 5000;
  protected String[] _colNames = { "Date", "Thread", "Message #", "Level", "NDC", "Category", "Message", "Location", "Thrown" };
  
  public void setLogRecordFilter(LogRecordFilter filter)
  {
    _filter = filter;
  }
  
  public LogRecordFilter getLogRecordFilter()
  {
    return _filter;
  }
  
  public String getColumnName(int i)
  {
    return _colNames[i];
  }
  
  public int getColumnCount()
  {
    return _colNames.length;
  }
  
  public int getRowCount()
  {
    return getFilteredRecords().size();
  }
  
  public int getTotalRowCount()
  {
    return _allRecords.size();
  }
  
  public Object getValueAt(int row, int col)
  {
    LogRecord record = getFilteredRecord(row);
    return getColumn(col, record);
  }
  
  public void setMaxNumberOfLogRecords(int maxNumRecords)
  {
    if (maxNumRecords > 0) {
      _maxNumberOfLogRecords = maxNumRecords;
    }
  }
  
  public synchronized boolean addLogRecord(LogRecord record)
  {
    _allRecords.add(record);
    if (!_filter.passes(record)) {
      return false;
    }
    getFilteredRecords().add(record);
    fireTableRowsInserted(getRowCount(), getRowCount());
    trimRecords();
    return true;
  }
  
  public synchronized void refresh()
  {
    _filteredRecords = createFilteredRecordsList();
    fireTableDataChanged();
  }
  
  public synchronized void fastRefresh()
  {
    _filteredRecords.remove(0);
    fireTableRowsDeleted(0, 0);
  }
  
  public synchronized void clear()
  {
    _allRecords.clear();
    _filteredRecords.clear();
    fireTableDataChanged();
  }
  
  protected List getFilteredRecords()
  {
    if (_filteredRecords == null) {
      refresh();
    }
    return _filteredRecords;
  }
  
  protected List createFilteredRecordsList()
  {
    List result = new ArrayList();
    Iterator records = _allRecords.iterator();
    while (records.hasNext())
    {
      LogRecord current = (LogRecord)records.next();
      if (_filter.passes(current)) {
        result.add(current);
      }
    }
    return result;
  }
  
  protected LogRecord getFilteredRecord(int row)
  {
    List records = getFilteredRecords();
    int size = records.size();
    if (row < size) {
      return (LogRecord)records.get(row);
    }
    return (LogRecord)records.get(size - 1);
  }
  
  protected Object getColumn(int col, LogRecord lr)
  {
    if (lr == null) {
      return "NULL Column";
    }
    String date = new Date(lr.getMillis()).toString();
    switch (col)
    {
    case 0: 
      return date + " (" + lr.getMillis() + ")";
    case 1: 
      return lr.getThreadDescription();
    case 2: 
      return new Long(lr.getSequenceNumber());
    case 3: 
      return lr.getLevel();
    case 4: 
      return lr.getNDC();
    case 5: 
      return lr.getCategory();
    case 6: 
      return lr.getMessage();
    case 7: 
      return lr.getLocation();
    case 8: 
      return lr.getThrownStackTrace();
    }
    String message = "The column number " + col + "must be between 0 and 8";
    throw new IllegalArgumentException(message);
  }
  
  protected void trimRecords()
  {
    if (needsTrimming()) {
      trimOldestRecords();
    }
  }
  
  protected boolean needsTrimming()
  {
    return _allRecords.size() > _maxNumberOfLogRecords;
  }
  
  protected void trimOldestRecords()
  {
    synchronized (_allRecords)
    {
      int trim = numberOfRecordsToTrim();
      if (trim > 1)
      {
        List oldRecords = _allRecords.subList(0, trim);
        
        oldRecords.clear();
        refresh();
      }
      else
      {
        _allRecords.remove(0);
        fastRefresh();
      }
    }
  }
  
  private int numberOfRecordsToTrim()
  {
    return _allRecords.size() - _maxNumberOfLogRecords;
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.FilteredLogTableModel
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import javax.swing.JComponent;

final class LF5SwingUtils$1
  implements Runnable
{
  private final JComponent val$component;
  
  LF5SwingUtils$1(JComponent paramJComponent) {}
  
  public void run()
  {
    val$component.repaint();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LF5SwingUtils.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.Adjustable;
import javax.swing.JComponent;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.table.TableModel;

public class LF5SwingUtils
{
  public static void selectRow(int row, JTable table, JScrollPane pane)
  {
    if ((table == null) || (pane == null)) {
      return;
    }
    if (!contains(row, table.getModel())) {
      return;
    }
    moveAdjustable(row * table.getRowHeight(), pane.getVerticalScrollBar());
    selectRow(row, table.getSelectionModel());
    
    repaintLater(table);
  }
  
  public static void makeScrollBarTrack(Adjustable scrollBar)
  {
    if (scrollBar == null) {
      return;
    }
    scrollBar.addAdjustmentListener(new TrackingAdjustmentListener());
  }
  
  public static void makeVerticalScrollBarTrack(JScrollPane pane)
  {
    if (pane == null) {
      return;
    }
    makeScrollBarTrack(pane.getVerticalScrollBar());
  }
  
  protected static boolean contains(int row, TableModel model)
  {
    if (model == null) {
      return false;
    }
    if (row < 0) {
      return false;
    }
    if (row >= model.getRowCount()) {
      return false;
    }
    return true;
  }
  
  protected static void selectRow(int row, ListSelectionModel model)
  {
    if (model == null) {
      return;
    }
    model.setSelectionInterval(row, row);
  }
  
  protected static void moveAdjustable(int location, Adjustable scrollBar)
  {
    if (scrollBar == null) {
      return;
    }
    scrollBar.setValue(location);
  }
  
  protected static void repaintLater(JComponent component)
  {
    SwingUtilities.invokeLater(new Runnable()
    {
      private final JComponent val$component;
      
      public void run()
      {
        val$component.repaint();
      }
    });
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LF5SwingUtils
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import javax.swing.JFrame;

class LogBrokerMonitor$1
  implements Runnable
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$1(LogBrokerMonitor paramLogBrokerMonitor, int paramInt) {}
  
  public void run()
  {
    Thread.yield();
    this$0.pause(val$delay);
    this$0._logMonitorFrame.setVisible(true);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.apache.log4j.lf5.LogLevel;

class LogBrokerMonitor$10
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$10(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    LogLevel.resetLogLevelColorMap();
    
    this$0._table.getFilteredLogTableModel().refresh();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.10
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenuItem;
import org.apache.log4j.lf5.LogLevel;

class LogBrokerMonitor$11
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$11(LogBrokerMonitor paramLogBrokerMonitor, JMenuItem paramJMenuItem, LogLevel paramLogLevel) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.showLogLevelColorChangeDialog(val$result, val$logLevel);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.11
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$12
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$12(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0._table.getFilteredLogTableModel().refresh();
    this$0.updateStatusLabel();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.12
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

class LogBrokerMonitor$13
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$13(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    List selectedColumns = this$0.updateView();
    this$0._table.setView(selectedColumns);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.13
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

class LogBrokerMonitor$14
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$14(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.selectAllLogTableColumns(true);
    
    List selectedColumns = this$0.updateView();
    this$0._table.setView(selectedColumns);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.14
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

class LogBrokerMonitor$15
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$15(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.selectAllLogTableColumns(false);
    
    List selectedColumns = this$0.updateView();
    this$0._table.setView(selectedColumns);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.15
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$16
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$16(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.requestOpen();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.16
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$17
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$17(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.requestOpenURL();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.17
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$18
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$18(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.requestClose();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.18
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$19
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$19(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.requestOpenMRU(e);
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.19
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import org.apache.log4j.lf5.LogRecord;
import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerModel;
import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerTree;

class LogBrokerMonitor$2
  implements Runnable
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$2(LogBrokerMonitor paramLogBrokerMonitor, LogRecord paramLogRecord) {}
  
  public void run()
  {
    this$0._categoryExplorerTree.getExplorerModel().addLogRecord(val$lr);
    this$0._table.getFilteredLogTableModel().addLogRecord(val$lr);
    this$0.updateStatusLabel();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$20
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$20(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.requestExit();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.20
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$21
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$21(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.saveConfiguration();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.21
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$22
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$22(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.resetConfiguration();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.22
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$23
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$23(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.setMaxRecordConfiguration();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.23
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$24
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$24(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.showPropertiesDialog("LogFactor5 Properties");
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.24
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$25
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$25(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0.findSearchText();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.25
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;

class LogBrokerMonitor$26
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$26(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    String inputValue = JOptionPane.showInputDialog(this$0._logMonitorFrame, "Find text: ", "Search Record Messages", 3);
    
    this$0.setSearchText(inputValue);
    this$0.findSearchText();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.26
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;

class LogBrokerMonitor$27
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$27(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    String inputValue = JOptionPane.showInputDialog(this$0._logMonitorFrame, "Sort by this NDC: ", "Sort Log Records by NDC", 3);
    
    this$0.setNDCTextFilter(inputValue);
    this$0.sortByNDC();
    this$0._table.getFilteredLogTableModel().refresh();
    this$0.updateStatusLabel();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.27
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

class LogBrokerMonitor$28
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$28(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
    this$0._table.getFilteredLogTableModel().setLogRecordFilter(this$0.createLogRecordFilter());
    
    this$0.setNDCTextFilter("");
    this$0._table.getFilteredLogTableModel().refresh();
    this$0.updateStatusLabel();
  }
}

/* Location:
 * Qualified Name:     org.apache.log4j.lf5.viewer.LogBrokerMonitor.28
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.apache.log4j.lf5.viewer;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.apache.log4j.lf5.LogRecord;
import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerModel;
import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryExplorerTree;

class LogBrokerMonitor$29
  implements ActionListener
{
  private final LogBrokerMonitor this$0;
  
  LogBrokerMonitor$29(LogBrokerMonitor paramLogBrokerMonitor) {}
  
  public void actionPerformed(ActionEvent e)
  {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd