Package limpidlog.lib

Examples of limpidlog.lib.Options


    createNewFile();
  }

  protected void createNewFile() throws Exception {
    Options options = new Options();

    fileName = getFileName();
    if (Options.debug)
      System.out.println("FileLog.createNewFile: fileName="+fileName);

    theFile = new File(fileName);
    writer = new FileWriter(fileName);

    String threadName = Thread.currentThread().getName();
    log(threadName, "", Options.LIMPIDLOG_VERSION, dataVersion + "\t" + version);
    log(threadName, "", Options.LIMPIDLOG_OPTIONS, options.getBytecoderOptions());
    log(threadName, "", LIMPIDLOG_FILE_FORMAT, fileFormatVersion);
  }
View Full Code Here


    simpleDateFormat.format(date, buffer, new FieldPosition(0));
    return buffer.toString();
  }

  protected String getFileName() {
    Options options = new Options();
    String fixedName = options.getOption(Options.FILE_LOG_FIXED_NAME, null);
    if (fixedName != null) {
      maxSize = Long.MAX_VALUE;
      return fixedName;
    }
         
    fileBaseName = options.getOption(Options.FILE_LOG_BASE_NAME, fileBaseName);
    maxSize = options.getOptionInt(Options.FILE_LOG_MAX_SIZE, 100) * 1048576//unit: Meg

    Date date = new Date();
    StringBuffer buffer = new StringBuffer("");
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
    simpleDateFormat.format(date, buffer, new FieldPosition(0));
View Full Code Here

        ex.printStackTrace();
    }
  }

  public DatabaseLog() throws Exception {
    Options options = new Options();
    databaseDriverName = options.databaseDriverName;
    databaseUrl = options.databaseUrl;
    databaseUserName = options.databaseUserName;
    databasePassword = options.databasePassword;
    queryTimeout = options.databaseQueryTimeout;
View Full Code Here

    insertStatement = connection.prepareStatement(insertSql);
    insertStatement.setQueryTimeout(queryTimeout);

    String threadName = Thread.currentThread().getName();
    log(threadName, "", Options.LIMPIDLOG_VERSION, dataVersion + "\t" + version);
    log(threadName, "", Options.LIMPIDLOG_OPTIONS, new Options().getBytecoderOptions());
  }
View Full Code Here

TOP

Related Classes of limpidlog.lib.Options

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.