lib/logstash/codecs/cef.rb
def sanitize_extension_val(value)
    output = ""

    value = value.to_s.gsub(/\r\n/, "\n")

    value.each_char{|c|
      case c
      when "\\", "="
        output += "\\" + c
      when "\n", "\r"
        output += "\\n"
      else
        output += c
      end
    }

    return output
  end
# Escape equal signs in the extensions. Canonicalize newlines.
# CEF spec leaves it up to us to choose \r or \n for newline.
# We choose \n as the default.
Escape equal signs in the extensions. Canonicalize newlines.
CEF spec leaves it up to us to choose \r or \n for newline.
We choose \n as the default.
Escape equal signs in the extensions . Canonicalize newlines . CEF spec leaves it up to us to choose \ r or \ n for newline . We choose \ n as the default .
def sanitize_extension_val(value)
    output = ""
    value = value.to_s.gsub(/\r\n/, "\n")
    value.each_char{|c|
      case c
      when "\\", "="
        output += "\\" + c
      when "\n", "\r"
        output += "\\n"
      else
        output += c
      end
    }
    return output
  end
def sanitize_extension_val ( value ) output = "" value = value . to_s . gsub ( / \r \n / , "\n" ) value . each_char { | c | case c when "\\" , "=" output += "\\" + c when "\n" , "\r" output += "\\n" else output += c end } return output end
Escape equal signs in the extensions.
Escape equal signs in the extensions .
value