You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "vttpaasdev002 (via GitHub)" <gi...@apache.org> on 2025/11/26 03:19:25 UTC
[I] help request: Can i split the log files by Route ID? [apisix]
vttpaasdev002 opened a new issue, #12778:
URL: https://github.com/apache/apisix/issues/12778
### Description
I'm using APISIX but it write all logs to one file access.log and error.log. How can i split there log files by Route ID (access.route_1.log, access.route_2.log,...)?
### Environment
- APISIX version: 3.1
- Operating system: Ubuntu 24.04.1
--
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
Re: [I] help request: Can i split the log files by Route ID? [apisix]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop closed issue #12778: help request: Can i split the log files by Route ID?
URL: https://github.com/apache/apisix/issues/12778
--
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: Can i split the log files by Route ID? [apisix]
Posted by "luuvanloia4 (via GitHub)" <gi...@apache.org>.
luuvanloia4 commented on issue #12778:
URL: https://github.com/apache/apisix/issues/12778#issuecomment-3578883461
> This is generally not recommended, but we have built-in support for periodically splitting logs. You can refer to https://apisix.apache.org/docs/apisix/plugins/log-rotate/
I saw the generated nginx.conf file, which has all main logic under one "server" and one "location" block. So there is no way I can split the log files by the "server" level or "location" level like nginx does?
--
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: Can i split the log files by Route ID? [apisix]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #12778:
URL: https://github.com/apache/apisix/issues/12778#issuecomment-3584660182
You are correct that APISIX generates an nginx.conf with a single server block (and a catch-all location /) to handle all traffic dynamically via Lua. This design means you cannot use the traditional Nginx method of defining multiple server blocks to split logs.
However, you can use file-logger by enabling the plugin in different routes and configuring different file paths. This will help you achieve your goal.
--
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: Can i split the log files by Route ID? [apisix]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #12778:
URL: https://github.com/apache/apisix/issues/12778#issuecomment-3578819629
This is generally not recommended, but we have built-in support for periodically splitting logs. You can refer to https://apisix.apache.org/docs/apisix/plugins/log-rotate/
--
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