Nginx custom template http log with service name

hi

how can add get the upstream service name to add on the http log format?
map $upstream_service_name $backend_name {
default $host;
}

which var i should use instead of $host;

solved

 log_by_lua_block {
        ngx.var.upstream_service_name = ngx.ctx.service.name 
        Kong.log()
    }
1 Like

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ