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

feat(http-logger): support for specified the log formats via admin API #2309

Merged
merged 2 commits into from
Oct 13, 2020
Merged

feat(http-logger): support for specified the log formats via admin API #2309

merged 2 commits into from
Oct 13, 2020

Commits on Oct 13, 2020

  1. feat(http-logger): support for specified the log formats via admin API .

    curl http://****/apisix/admin/plugin_metadata/http-logger -d '
    {
        "log_format": {
            "host": "$host",
            "@timestamp": "$time_iso8601",
            "client_ip": "$remote_addr"
        }
    }'
    
    when we enabled plugin http-logger, we will get the message body like:
    
    {"host":"localhost","@timestamp":"2020-09-23T18:29:07-04:00","client_ip":"127.0.0.1","route_id":"1"}
    {"host":"localhost","@timestamp":"2020-09-23T18:29:07-04:00","client_ip":"127.0.0.1","route_id":"1"}
    membphis committed Oct 13, 2020
    Configuration menu
    Copy the full SHA
    55d29dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31cc7ef View commit details
    Browse the repository at this point in the history