Closed riku22 closed 4 years ago
The template isn't a Go template, so the usage of double braces and the function index
isn't correct. The syntax of the template is defined by the backing library github.com/buger/jsonparser. For your use-case, you need: format formatted "{request>headers>User-Agent>[0]}"
.
This is a shortcoming in the documentation of this module. I'll address it in the README shortly.
Hello.
I'm trying to log only one from the User-Agent header. I wrote the following template.
However, this does not work well, and the character string specified in the format as shown below is output as it is.
Is it difficult to do this?
The environment is as follows.
Best regards.