villajo commented on issue #6533: URL: https://github.com/apache/trafficcontrol/issues/6533#issuecomment-1314264463
So, they would both have separate log files still. That portion would still be controlled by log4j. It's the log rotation that would be removed from the log4j2.xml and then handled by logrotate. I took one of our production servers and tested the configuration. This is how the log folder would look with daily rotations. The 11th is small because I did this later on in the day. drwxr-xr-x 4 root root 4.0K Nov 14 04:02 . drwxr-xr-x 4 root root 4.0K Nov 11 18:22 .. -rw-r----- 1 root root 231M Nov 14 19:12 access.log -rw-r----- 1 root root 13K Nov 11 16:22 access.log-11112022.gz -rw-r----- 1 root root 9.1M Nov 12 04:01 access.log-12112022.gz -rw-r----- 1 root root 20M Nov 13 04:01 access.log-13112022.gz -rw-r----- 1 root root 19M Nov 14 04:01 access.log-14112022.gz -rw-r----- 1 root root 3.7M Nov 14 19:12 traffic_router.log -rw-r----- 1 root root 2.0K Nov 11 16:22 traffic_router.log-11112022.gz -rw-r----- 1 root root 73K Nov 12 04:01 traffic_router.log-12112022.gz -rw-r----- 1 root root 143K Nov 13 04:02 traffic_router.log-13112022.gz -rw-r----- 1 root root 145K Nov 14 04:01 traffic_router.log-14112022.gz The advantage would be that we would keep the same inode for the log file allowing it to be copied instead of moved then truncated. The log forwarding application would be able to continue reading logs and we won't have issues related to open rotated files that we have been seeing on other nodes. I have looked and compared two of our nodes in one location and have verified this takes care of all of the extra open files we were seeing open via lsof after a rotation occured. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
