# Recycle PHP Log

- Thread: https://externals.io/message/63636
- Original archive: https://news-web.php.net/php.internals/63636
- Started by Raymond Irving on 2012-10-25T19:16:39+00:00
- Messages: 8
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #63636 — Raymond Irving — 2012-10-25T19:16:39+00:00

URL: https://externals.io/message/63636#63636

Hello,

How about adding an option to recycle the PHP log when it gets too big?

For example:

[php ini]
max_error_log_size = 512k

When the log file is larger than 512k rename the file by adding the current
date or timestamp:

php_error_as_at_2012_10_10.log

__
Raymond

---

## #63637 — Antony Dovgal — 2012-10-25T19:59:41+00:00

URL: https://externals.io/message/63636#63637 · In reply to: #63636

Just use logrotate for that.


> Hello,
>
> How about adding an option to recycle the PHP log when it gets too big?
>
> For example:
>
> [php ini]
> max_error_log_size = 512k
>
> When the log file is larger than 512k rename the file by adding the current
> date or timestamp:
>
> php_error_as_at_2012_10_10.log
>
> __
> Raymond
>


-- 
Wbr,
Antony Dovgal
---
http://pinba.org - realtime profiling for PHP

---

## #63662 — Mario Brandt — 2012-10-27T09:17:41+00:00

URL: https://externals.io/message/63636#63662 · In reply to: #63637

Hi,


> Just use logrotate for that.

On Windows there is no logrotate by defautl, so that would be a nice feature ;)

Cheers
Mario

---

## #63663 — Kris Craig — 2012-10-27T09:53:18+00:00

URL: https://externals.io/message/63636#63663 · In reply to: #63662

> Hi,
>
> On Thu, Oct 25, 2012 at 9:59 PM, Antony Dovgal <tony@daylessday.org>
> wrote:
> > […]
>
> On Windows there is no logrotate by defautl, so that would be a nice
> feature ;)
>
> Cheers
> Mario
>
> --
> 
> 
>
>
I agree.  This would definitely be a nice feature to have, at least for the
Windows build.

--Kris

---

## #63664 — Stas Malyshev — 2012-10-27T14:19:09+00:00

URL: https://externals.io/message/63636#63664 · In reply to: #63663

Hi!

> > […]
> I agree.  This would definitely be a nice feature to have, at least for the
> Windows build.

There are a number of solutions for that:
https://www.google.com/search?q=logrotate+windows

PHP doesn't have to include the whole world so that nobody has to
install any utilities besides it.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #63701 — Pierre Joye — 2012-10-29T09:10:37+00:00

URL: https://externals.io/message/63636#63701 · In reply to: #63663

hi,

No, we won't implement that as it is already available by default on
windows. check the AutoBackupLogFiles option.

For people not using windows log system but classic files, there are
plenty of tools to do it as well.

Cheers,


> 
>
> > […]
> I agree.  This would definitely be a nice feature to have, at least for the
> Windows build.
>
> --Kris



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #63720 — Raymond Irving — 2012-10-30T17:33:48+00:00

URL: https://externals.io/message/63636#63720 · In reply to: #63701

Most of these utilities require admin user access to the server. For
example, Logrotate is  normally run as a daily cron job

There are a lot of shared services that will not allow users to install or
run certain jobs.

How difficult will if be to add this feature to PHP? Will it require major
change to the program?

__
Raymond



> hi,
>
> No, we won't implement that as it is already available by default on
> windows. check the AutoBackupLogFiles option.
>
> For people not using windows log system but classic files, there are
> plenty of tools to do it as well.
>
> Cheers,
>
> 
> > […]
> the
> > […]
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #63721 — Tom Boutell — 2012-10-30T17:47:23+00:00

URL: https://externals.io/message/63636#63721 · In reply to: #63720

So? Non-administrative users should not be worrying about rotating log
files. "Shared services" have administrators who are keenly interested
in not running out of disk space due to silly things like log files
and provide rotation of them (or if not, you have a choice of better
providers who do).


> Most of these utilities require admin user access to the server. For
> example, Logrotate is  normally run as a daily cron job
>
> There are a lot of shared services that will not allow users to install or
> run certain jobs.
>
> How difficult will if be to add this feature to PHP? Will it require major
> change to the program?
>
> __
> Raymond
>
> 
>
> > […]



-- 
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com
