-
Notifications
You must be signed in to change notification settings - Fork 63
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
log_format #9
Comments
I think the output result is the better format. |
Another related issue is that formatter is actually breaking multiline string values with braces. (eg. json) def test_multiline_string(self):
self._check_formatting(
(
"""http {\n"""
""" log_format le_json '{"time":"$time_iso8601", '\n"""
""" '"client_agent":"$client_agent",\n"""
""" '"user_agent":"$http_user_agent"}';\n"""
"""}\n"""
),
(
"""http {\n"""
""" log_format le_json '{"time":"$time_iso8601", '\n"""
""" '"client_agent":"$client_agent",\n"""
""" '"user_agent":"$http_user_agent"}';\n"""
"""}\n"""
),
) Modified test output:
And this causes three unnecessary newlines on output for each log record. |
Could we use the official |
@denji my goal was to be without any dependencies (just Python), so deployment to various environments is easy (just copy the script). So I won't accept introducing 3rd party libs. |
Multiline
log_format
does not correction the alignmentInput data:
Output result
The text was updated successfully, but these errors were encountered: