Added possibility to ignore JSON format and added backslashes escape for JSON
- Now it is possible to send logs in plain text format when nginx fluentd_tag is empty: (fluentd_tag '';)
- curl 'localhost/\t' produced broken JSON format and td-agent was not able to parse JSON format. I've added possibility to escape backslashes if necessary.
First of all I've tried to implement this feature without additional escaped_line variable, but I was not able to determine how many slashes are there to alloc the extra memory. So I had to create new variable.
Thanks for the request. There is a default tag "nginx", you can see line 191. I will check the backslash escape.
There is default 'nginx' tag if you don't set the fluentd_tag. But if you will set it to empty string - all logs will be sent if plain text.
If you tell me how can I realloc already allocated memory using nginx functions - I will provide more optimized solution (less memory and CPU cycles).
Also I have question for "len" and "p - line" values: why are they different?