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

Dumper does not preserve the formatting in log_format #27

Open
FeiYing9 opened this issue Oct 19, 2023 · 0 comments
Open

Dumper does not preserve the formatting in log_format #27

FeiYing9 opened this issue Oct 19, 2023 · 0 comments
Assignees
Labels
v2 issues that would be fixed in v2 only

Comments

@FeiYing9
Copy link

I have a log_format like this:

    log_format main '{"@timestamp":"$time_iso8601",'
                    '"host":"$hostname",'
                    '"server_ip":"$server_addr",'
                    '"client_ip":"$remote_addr",'
                    '"remote_user":"$remote_user",'
                    '"xff":"$http_x_forwarded_for",'
                    '"domain":"$host",'
                    '"url":"$uri",'
                    '"referer":"$http_referer",'
                    '"args":"$args",'
                    '"upstream_response_time":"$upstream_response_time",'
                    '"request_time":"$request_time",'
                    '"request_method":"$request_method",'
                    '"status":"$status",'
                    '"size":"$body_bytes_sent",'
                    '"content_length":"$content_length",'
                    '"request_length":"$request_length",'
                    '"protocol":"$server_protocol",'
                    '"upstreamhost":"$upstream_addr",'
                    '"file_dir":"$request_filename",'
                    '"http_user_agent":"$http_user_agent",'
                    '"upstream_cache_status":"$upstream_cache_status",'
                    '"file_name":"$file_name"'
                    '}';

After the dump code ,the result is:

log_format main {@timestamp:, host:, server_ip:, client_ip:, remote_user:, xff:, domain:, url:, referer:, args:, upstream_response_time:, request_time:, request_method:, status:, size:, content_length:, request_length:, protocol:, upstreamhost:, file_dir:, http_user_agent:, upstream_cache_status:, file_name: };
@tufanbarisyildirim tufanbarisyildirim self-assigned this Dec 23, 2023
@tufanbarisyildirim tufanbarisyildirim added the v2 issues that would be fixed in v2 only label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 issues that would be fixed in v2 only
Projects
None yet
Development

No branches or pull requests

2 participants