Conditional logging variable removed from kong access_log directive. #10848
-
I've been following along this article about how to conditionally log requests with kong. I'm using Kong on docker Tried two approaches to achieve my goal, but no luck at all.. 1st Approach -- Use the entire template from the article. The template is the same proposed in the article, stored under
with this
When trying to run kong using the template got the following error:
The template is still the same, though
QUESTION: Why is this happening? Kong should be able to start without complaining about worker_processes, no? 2nd Approach -- Partial file + nginx_http_include I then moved on to try just include that on the template. So my conf when to this
And i passed the following env var
Then whatever request i send is not logged, regardless of pattern. I even tried to strip it down to just the following, but no luck at all..
If i remove the
LAST BUT NOT LEAST I noticed that on both approaches the
Any idea how on how to make it log condittionally ? I'd personally prefer the second approach, since i think it would require less configuration changes, simply adding exactly what i need. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Case closed. The variable keeplog wasn't being escaped on docker. noticed that because of the warning
Fixed by escaping it using
|
Beta Was this translation helpful? Give feedback.
Case closed.
The variable keeplog wasn't being escaped on docker.
noticed that because of the warning
Fixed by escaping it using
$$
, like that