Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to define line endings #412

Closed
alaczi opened this issue Apr 20, 2017 · 2 comments
Closed

Ability to define line endings #412

alaczi opened this issue Apr 20, 2017 · 2 comments

Comments

@alaczi
Copy link
Contributor

alaczi commented Apr 20, 2017

So I ran into a problem when I need to delivery logs to a Splunk Cloud instance.
The configuration of this Splunk instance is out of my reach, and by default it uses windows style line endings "\r\n" to separate each item.
Current version of encoders have the line endings hardcoded to \n. My proposal is to allow configuring the line endings adding a LineSeparator string property the zapcore.EncoderConfig and using that to append in the encoders to the end of the generated log line.

@akshayjshah
Copy link
Contributor

This is completely reasonable, and I'd love a PR that makes this change. Let's just make sure that we keep the zero value's behavior unchanged.

@alaczi
Copy link
Contributor Author

alaczi commented May 4, 2017

@akshayjshah thanks, created a PR for this change.

akshayjshah pushed a commit that referenced this issue May 5, 2017
Add LineEnding to EncoderConfig, which allows Windows users to use non-Unix newlines.

Fixes #412.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants