You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/05 07:36:14 UTC
[GitHub] [apisix] snowdusk opened a new issue #6517: feat: log-rotate最好可以整点切割
snowdusk opened a new issue #6517:
URL: https://github.com/apache/apisix/issues/6517
### Issue description
当前的实现第一次切割时间为
```
if not rotate_time then
-- first init rotate time
rotate_time = now_time + interval
core.log.info("first init rotate time is: ", rotate_time)
return
end
```
会造成日志不是按照整点或者整分钟切割
可以改为
```
if not rotate_time then
-- first init rotate time
rotate_time = now_time + interval - (now_time % interval)
core.log.info("first init rotate time is: ", rotate_time)
return
end
```
--
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] membphis commented on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1059885831
@snowdusk I think you are right. It seems https://github.com/apache/apisix/commit/139c3972898f1e45c6d5b1f40143c504116b3486 break this feature
--
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] snowdusk commented on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
snowdusk commented on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1060125262
@shuaijinchao OK. I will create a PR
--
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] shuaijinchao commented on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1059890400
I don't understand what problem can be solved this way? @membphis
--
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] membphis commented on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1059885920
> @snowdusk I think you are right. It seems [139c397](https://github.com/apache/apisix/commit/139c3972898f1e45c6d5b1f40143c504116b3486) break this feature
need @shuaijinchao's help
--
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] shuaijinchao edited a comment on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
shuaijinchao edited a comment on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1059890400
@snowdusk Sorry, this is a problem caused by one of my previous PRs. Aligning time avoids fragmented logs in case of restarts etc. during rotation time, so the solution you provided would be better.
Are you interested in 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
[GitHub] [apisix] shuaijinchao commented on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
shuaijinchao commented on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1059764643
What problem does this solve? Also I don't think this is a bug
--
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] shuaijinchao edited a comment on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
shuaijinchao edited a comment on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1059890400
@snowdusk sorry, this is a problem caused by one of my previous PRs. When restarting and other operations occur during the rotation time, aligning the time will avoid the generation of fragmented logs.
--
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] soulbird commented on issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #6517:
URL: https://github.com/apache/apisix/issues/6517#issuecomment-1059886133
Strictly hourly rotation of logs is better
--
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] spacewander closed issue #6517: bug: log-rotate can not rotate logs strictly hourly(or minutely)
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #6517:
URL: https://github.com/apache/apisix/issues/6517
--
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