Date: Mon, 17 Jul 2023 12:01:56 -0400 From: Robert Fitzpatrick <robert@webtent.org> To: =?UTF-8?Q?Morgan_Wesstr=c3=b6m?= <freebsd-database@pp.dyndns.biz> Cc: questions@freebsd.org Subject: Re: Apache log rotation Message-ID: <d2fffaf1-4e28-8bf9-9fd1-a61abaf699d5@webtent.org> In-Reply-To: <334c1023-8283-2c41-f284-ccc44bae6d0a@pp.dyndns.biz> References: <e555269d-4c81-3e18-4079-0caa044fde9b@webtent.org> <334c1023-8283-2c41-f284-ccc44bae6d0a@pp.dyndns.biz>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------17F58F1EEA4F7BE8BAB7C956 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit > Morgan Wesström <mailto:freebsd-database@pp.dyndns.biz> > Monday, July 17, 2023 8:19 AM > > > I don't have an answer for your specific problem but just wanted to > suggest an alternative solution. Have you looked at sysutils/cronolog? > Instead of relying on logrotate and restarting the apache process you > simply pipe the logs to cronolog which splits them according to a > pattern you define. Apache will run uninterrupted and logrotate won't > be used at all. > > Snippets from my own conf files that splits the logfiles per > year-month (note the pipe sign): > > ErrorLog "|/usr/local/sbin/cronolog > /var/log/apache24/httpd-error.%Y%m.default.log" > CustomLog "|/usr/local/sbin/cronolog > /var/log/apache24/httpd-access.%Y%m.default.log" combinedio Thanks, could be very helpful. --------------17F58F1EEA4F7BE8BAB7C956 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <html theme="default-light" iconset="color"><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head><body text="#000000"><br> <blockquote type="cite" cite="mid:334c1023-8283-2c41-f284-ccc44bae6d0a@pp.dyndns.biz" style="border: 0px none ! important;"> <div xmlns="http://www.w3.org/1999/xhtml" class="__pbConvHr" style="margin:30px 25px 10px 25px;"><div style="width:100%;border-top:2px solid rgba(146,154,163,0.7);padding-top:10px;"> <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;"> <a style="color:#485664 !important;padding-right:6px;font-weight:500;text-decoration:none !important;" href="mailto:freebsd-database@pp.dyndns.biz" moz-do-not-send="true">Morgan Wesström</a></div> <div style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align: right;"> <font color="#909AA4"><span style="padding-left:6px">Monday, July 17, 2023 8:19 AM</span></font></div> </div></div> <div xmlns="http://www.w3.org/1999/xhtml" class="__pbConvBody" __pbrmquotes="true" style="color:#909AA4;margin-left:24px;margin-right:24px;"><br> <br>I don't have an answer for your specific problem but just wanted to suggest an alternative solution. Have you looked at sysutils/cronolog? Instead of relying on logrotate and restarting the apache process you simply pipe the logs to cronolog which splits them according to a pattern you define. Apache will run uninterrupted and logrotate won't be used at all. <br> <br>Snippets from my own conf files that splits the logfiles per year-month (note the pipe sign): <br> <br>ErrorLog "|/usr/local/sbin/cronolog /var/log/apache24/httpd-error.%Y%m.default.log" <br>CustomLog "|/usr/local/sbin/cronolog /var/log/apache24/httpd-access.%Y%m.default.log" combinedio </div> </blockquote> Thanks, could be very helpful.</body></html> --------------17F58F1EEA4F7BE8BAB7C956--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d2fffaf1-4e28-8bf9-9fd1-a61abaf699d5>