Package org.apache.log4j.lf5

Examples of org.apache.log4j.lf5.LogRecord


    try {
      int index = Integer.parseInt(num) - 1;

      InputStream in = _mruFileManager.getInputStream(index);
      LogFileParser lfp = new LogFileParser(in);
      lfp.parse(this);

      _mruFileManager.moveToTop(index);
      updateMRUList();

    } catch (Exception me) {
View Full Code Here


   * Loads and parses a log file.
   */
  protected boolean loadLogFile(File file) {
    boolean ok = false;
    try {
      LogFileParser lfp = new LogFileParser(file);
      lfp.parse(this);
      ok = true;
    } catch (IOException e) {
      LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(
          getBaseFrame(), "Error reading " + file.getName());
    }
View Full Code Here

   * Loads a parses a log file running on a server.
   */
  protected boolean loadLogFile(URL url) {
    boolean ok = false;
    try {
      LogFileParser lfp = new LogFileParser(url.openStream());
      lfp.parse(this);
      ok = true;
    } catch (IOException e) {
      LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(
          getBaseFrame(), "Error reading URL:" + url.getFile());
    }
View Full Code Here

    try {
      int index = Integer.parseInt(num) - 1;

      InputStream in = _mruFileManager.getInputStream(index);
      LogFileParser lfp = new LogFileParser(in);
      lfp.parse(this);

      _mruFileManager.moveToTop(index);
      updateMRUList();

    } catch (Exception me) {
View Full Code Here

   * Loads and parses a log file.
   */
  protected boolean loadLogFile(File file) {
    boolean ok = false;
    try {
      LogFileParser lfp = new LogFileParser(file);
      lfp.parse(this);
      ok = true;
    } catch (IOException e) {
      LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(
          getBaseFrame(), "Error reading " + file.getName());
    }
View Full Code Here

   * Loads a parses a log file running on a server.
   */
  protected boolean loadLogFile(URL url) {
    boolean ok = false;
    try {
      LogFileParser lfp = new LogFileParser(url.openStream());
      lfp.parse(this);
      ok = true;
    } catch (IOException e) {
      LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(
          getBaseFrame(), "Error reading URL:" + url.getFile());
    }
View Full Code Here

   * Loads a parses a log file running on a server.
   */
  protected boolean loadLogFile(URL url) {
    boolean ok = false;
    try {
      LogFileParser lfp = new LogFileParser(url.openStream());
      lfp.parse(this);
      ok = true;
    } catch (IOException e) {
      LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(
          getBaseFrame(), "Error reading URL:" + url.getFile());
    }
View Full Code Here

  protected void initComponents() {
    //
    // Configure the Frame.
    //
    ProductProperties props = ProductProperties.getInstance();

    _logMonitorFrame = new JFrame("LogFactor5");

    _logMonitorFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
View Full Code Here

  //--------------------------------------------------------------------------

  public LogFactor5AboutDialog(Frame owner) {
    super(owner, "About LogFactor5", true);

    ProductProperties props = ProductProperties.getInstance();

    setTitle("About LogFactor5");

    JPanel imagePanel = new JPanel();
    Resource aboutResource = new Resource("org/apache/log4j/lf5/viewer/images/" +
        "lf5_about.gif");
    URL aboutIconURL = aboutResource.getURL();
    ImageIcon aboutIcon = null;
    if (aboutIconURL != null) {
      aboutIcon = new ImageIcon(aboutIconURL);
    }

    JLabel imageLabel = new JLabel();

    if (aboutIcon != null) {
      imageLabel.setIcon(aboutIcon);
    }
    imagePanel.add(imageLabel);

    JPanel textPanel = new JPanel();
    textPanel.setLayout(new GridLayout(3, 1));


    int numberOfRows = 13;
    numberOfRows = 11; // we need less room for a registered user.
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new GridLayout(numberOfRows, 1));
    JLabel aboutLF5 = new JLabel("LogFactor5 v" + props.getProductVersionNumber(), JLabel.CENTER);
    aboutLF5.setHorizontalAlignment(SwingConstants.CENTER);
    JLabel donate = new JLabel("Contributed by ThoughtWorks Inc.");
    donate.setHorizontalAlignment(SwingConstants.CENTER);
    mainPanel.add(aboutLF5);
    mainPanel.add(Box.createVerticalStrut(10));
View Full Code Here

    }
    configuration.configure(file);
    log.debug("Full Hibernate Plugin's Session Factory configuration file \""+file+"\" configured");
   
    String fileProperties = file.substring(1,file.length()).replace(".cfg", "").replace("xml", "properties");
    Resource resource = new Resource(fileProperties);
    if (resource.getURL()!=null) {
      String fullpath = resource.getURL().getPath().replace("%20", " ");
      FileInputStream fis = new FileInputStream(fullpath);
      Properties properties = new Properties();
      properties.load(fis);
      fis.close();
      configuration.addProperties(properties);
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.