Skip to content

Conversation

kayrus
Copy link

@kayrus kayrus commented Nov 14, 2014

  1. Now it is possible to send logs in plain text format when nginx fluentd_tag is empty: (fluentd_tag '';)
  2. 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.

@semihalev
Copy link
Member

Thanks for the request. There is a default tag "nginx", you can see line 191. I will check the backslash escape.

@kayrus
Copy link
Author

kayrus commented Nov 14, 2014

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.

@kayrus
Copy link
Author

kayrus commented Nov 14, 2014

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants