@Override
  public void Configure(Context context) {
    // TODO Auto-generated method stub
    LOG.info("Config MultiLineParser");
    buffer_size_ = context.getInteger("read_buffer_size", 
        FlumeConstants.READ_BUFFER_SIZE).intValue();
    read_buffer_ = new byte[buffer_size_];
    max_buffer_size_ = context.getInteger("max_read_buffer_size", 
        FlumeConstants.MAX_READ_BUFFER_SIZE).intValue();
    max_record_size_ = context.getInteger("max_record_size",
        FlumeConstants.MAX_RECORD_LENGH);
    
    file_content_include_pattern_str_ = context.getString(
        FlumeConstants.FILE_CONTENT_INCLUDE, default_content_include_str_);
    file_content_exclude_pattern_str_ = context
        .getString(FlumeConstants.FILE_CONTENT_EXCLUDE);

    record_include_pattern_ = Pattern
        .compile(file_content_include_pattern_str_);
    if (file_content_exclude_pattern_str_ != null) {
      record_exclude_pattern_ = Pattern
          .compile(file_content_exclude_pattern_str_);
    }

    first_line_pattern_str_ = context
        .getString(FlumeConstants.FIRST_LINE_PATTERN);
    last_line_pattern_str_ = context
        .getString(FlumeConstants.LAST_LINE_PATTERN);
    if (first_line_pattern_str_ != null) {
      first_line_pattern_ = Pattern.compile(first_line_pattern_str_);
    }
    if (last_line_pattern_str_ != null) {
      last_line_pattern_ = Pattern.compile(last_line_pattern_str_);
    }

    if (first_line_pattern_ != null && last_line_pattern_ != null) {
      parse_type_ = ParseType.MIX;
    } else if (first_line_pattern_ != null) {
      parse_type_ = ParseType.FIRST;
    } else if (last_line_pattern_ != null) {
      parse_type_ = ParseType.LAST;
    } else {
      parse_type_ = ParseType.NONE;
    }

    StringBuilder builder = new StringBuilder();
    builder.append("Config MultiLineParser with [");
    builder.append("read_buffer_size(init)=");
    builder.append(buffer_size_);
    builder.append(",max_buffer_size=");
    builder.append(max_buffer_size_);
    builder.append(",max_record_size=");
    builder.append(max_record_size_);
    builder.append(",first_line_pattern_str_=");
    builder.append(first_line_pattern_str_);
    builder.append(",last_line_pattern_str_=");
    builder.append(last_line_pattern_str_);
    builder.append(",file_content_include_pattern_str_=");
    builder.append(file_content_include_pattern_str_);
    builder.append(",record_include_pattern_=");
    builder.append(record_include_pattern_ == null ? "null"
        : record_include_pattern_.toString());
    builder.append(",file_content_exclude_pattern_str_=");
    builder.append(file_content_exclude_pattern_str_);
    builder.append(",record_exclude_pattern_=");
    builder.append(record_exclude_pattern_ == null ? "null"
        : record_exclude_pattern_.toString());
    builder.append(", parse_type=");
    builder.append("" + parse_type_);
    builder.append("]");
    LOG.info(builder.toString());
    builder = null;
  }