Open GoogleCodeExporter opened 9 years ago
I'd rather not since the log can be managed by a seperate process such as a
scheduled
task on Windows or the logrotate tool on Linux but I can see the demand for this
feature. I will accept this issue but make it low priority.
Original comment by hogantp
on 17 Jul 2009 at 6:35
scheduled task on Windows or logrotate on Linux will not work while ghost
access to
file... hmm.. i even can't imagine whats happen with ghost, when some of tool
will
try to access to logfile...
Original comment by m...@rooty.name
on 30 Jul 2009 at 8:17
I personally use a file renamer script that I've done quickly in PHP that runs
at
midnight. It basically delete the latest file (ghost.log.7 for example) and
rename
all the others from .n to .(n+1) . This makes log files of an acceptable size
and
they are now dated by the number of days past the current day and are deleted.
The same is easily doable for Windows in C# for example or C/C++. Even in bash
there
would be a way to do it, it's nothing complicated.
For truncating log files I've also done a quick PHP script that would use tail
to
trim the files. Basically I was running tail to get the latest 5000 lines of
the log
file, get the output in /tmp, delete the current log file and then move the
output in
/tmp .
This requires GHost++ not to lock the log file and I beleive that there is an
option
for that in the configuration.
Original comment by ManhimOne
on 19 Feb 2010 at 5:35
Original issue reported on code.google.com by
bazarov...@gmail.com
on 21 Jun 2009 at 11:51