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

[GitHub] [apisix] kayx23 opened a new issue, #9284: docs: populate default `log_format` for logging plugins

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

   ### Current State
   
   Help wanted, you should review all log plugin docs and update them. Should be an easy fix, however. 
   
   Currently no default value:
   ![image](https://user-images.githubusercontent.com/39619599/231041236-81a1e5c6-806a-49e2-a751-fad1b71bb770.png)
   
   
   
   
   ### Desired State
   
   Populated with 
   
   `{"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"}`


-- 
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] kayx23 commented on issue #9284: docs: populate default `log_format` for logging plugins

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

   > Hey @kayx23 , do I have to put `{"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"}` in the `Default` field of `log_format`
   > 
   > Did I get it right?
   
   That's correct. So far a lot of (if not most?) plugin docs with `log_format` do not provide a default value. 
   
   The default value should be `{"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"}`, as seen in [my comment above](https://github.com/apache/apisix/issues/9284#issuecomment-1502611367)
   


-- 
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] monkeyDluffy6017 closed issue #9284: docs: populate default `log_format` for logging plugins

Posted by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org>.
monkeyDluffy6017 closed issue #9284: docs: populate default `log_format` for logging plugins
URL: https://github.com/apache/apisix/issues/9284


-- 
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] Arghyahub commented on issue #9284: docs: populate default `log_format` for logging plugins

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

   Do let me know If I didn't get something right and I will work on it


-- 
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] kayx23 commented on issue #9284: docs: populate default `log_format` for logging plugins

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

   ## info that might be useful
   
   In `/apisix/utils/log-util.lua`: 
   
   ```
   local _M = {}
   _M.metadata_schema_log_format = {
       type = "object",
       default = {
           ["host"] = "$host",
           ["@timestamp"] = "$time_iso8601",
           ["client_ip"] = "$remote_addr",
       },
   }
   ```
   
   @soulbird mentioned the default format should be the same as the one available in metadata


-- 
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] Arghyahub commented on issue #9284: docs: populate default `log_format` for logging plugins

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

   Hey @kayx23 , do I have to put `{"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"}`
   int the `Default` field of `log_format`
   
   Did I get it right?


-- 
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] Arghyahub commented on issue #9284: docs: populate default `log_format` for logging plugins

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

   Okay @kayx23 , I'm fixing it๐Ÿ™‚


-- 
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