You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "coolboywcm (via GitHub)" <gi...@apache.org> on 2023/04/12 08:31:44 UTC

[GitHub] [apisix] coolboywcm opened a new issue, #9295: help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content

coolboywcm opened a new issue, #9295:
URL: https://github.com/apache/apisix/issues/9295

   ### Description
   
   How can I use the [http-logger] plugin to retrieve both the **route_name** and **rep_body** in the log content for a specific route without affecting the logging of other routes? I know that the **$route_name** variable can be used to retrieve the route name from the meta property of the [http-logger[ plugin, but this is a global configuration. Is it possible to retrieve the route_name within the http-logger plugin for a specific route only?
   
   my [http-logger] plugin content:
   "http-logger": {
         "_meta": {
           "disable": false
         },
         "concat_method": "new_line",
         "include_req_body": true,
         "include_resp_body": true,
         "uri": "http://xxxxxxx/apisix/addLog"
       }
   
   ### Environment
   
   APISIX version (3.1.0):
   Operating system (CentOS Linux release 7.6.1810):
   OpenResty / Nginx version (nginx version: openresty/1.21.4.1):
   etcd version, if relevant ("etcd_version":"3.4.0"):
   APISIX Dashboard version, if relevant(3.0.0)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] nic-6443 commented on issue #9295: help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content

Posted by "nic-6443 (via GitHub)" <gi...@apache.org>.
nic-6443 commented on issue #9295:
URL: https://github.com/apache/apisix/issues/9295#issuecomment-1506190654

   In the latest version of APISIX, [http-logger](https://apisix.apache.org/docs/apisix/plugins/http-logger/) supports configuring `log-format` at the plugin level. You can give it a try.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9295:
URL: https://github.com/apache/apisix/issues/9295#issuecomment-1742734220

   Due to lack of the reporter's response this issue has been labeled with "no response". It will be close in 3 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] shreemaan-abhishek commented on issue #9295: help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #9295:
URL: https://github.com/apache/apisix/issues/9295#issuecomment-1709520477

   you can register a custom variable and store the name of the route using serverless plugin:
   
   https://docs.api7.ai/apisix/reference/built-in-variables#method-2-in-the-serverless-plugins


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] shreemaan-abhishek commented on issue #9295: help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #9295:
URL: https://github.com/apache/apisix/issues/9295#issuecomment-1709521060

   Do you have any other questions?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #9295: help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content
URL: https://github.com/apache/apisix/issues/9295


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] help request: How use the [http-logger] plugin to retrieve both the 'route_name' and 'rep_body' in the log content [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9295:
URL: https://github.com/apache/apisix/issues/9295#issuecomment-1750325662

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org