You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Oki DZ <ok...@bdg.pindad.com> on 2001/05/16 02:15:58 UTC

Logrotate

Hi,

I'd like to rotate the logs created by James.
Should james be restarted after the logrotate runs? Logrotate will
compress and rename the log files. Problem is, will James create new log
files after the previous ones be renamed?

TIA,
Oki

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: Logrotate

Posted by Oki DZ <ok...@bdg.pindad.com>.
Hi,

I have the following in the config file of logrotate:
/var/log/james/* {
  daily
  rotate 5
  create 0664 root staff
  missingok
  compress
  delaycompress
}

I just found out this morning that James stopped working.
It seems that (current) James needs to be restarted if the logfiles are
moved/deleted.

Oki

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: Logrotate

Posted by Oki DZ <ok...@bdg.pindad.com>.
Harmeet Bedi wrote:
> I think it should be possible to replace the LogTarget to do what you want
> without changing James. The Avalon Log package should have some facilities.
> Peter Donald is the expert in that area.
> One stop gap hack that may work is replace
> org.apache.log.output.FileOutputLogTarget with your own file. This is only
> based on code inspection, so don't hold me to it. Your file could do the
> rotation, zip and create new file etc.

I think you didn't answer my question.
All I want to know is whether James will create new log files if the
current ones are deleted. Logrotate (Logrotate package) will compress
log files, so effectively changing their names. Simply put, what would
happen if the log files were deleted while James is running; create new
ones, or just simply hang?

Well, I could just simply test it now, but the server is already used by
other persons (not just me), so I think it would be nicer if I ask about
the log files here.

Oki

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: Logrotate

Posted by Oki DZ <ok...@bdg.pindad.com>.
Hi,

Just in case you'd need to logrotate the logs; I use the following
config for logrotate:
/var/log/james/*log {
  daily
  rotate 5
  missingok
  errors logmaster@somewhere.com
  compress
  copytruncate
}

I use Debian, and I put it in /etc/logrotate.d/james; the logs get
rotated and James doesn't need to be restarted. Take a look at "man
logrotate" on copytruncate, though.

Oki

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: Logrotate

Posted by Harmeet Bedi <hb...@yahoo.com>.
> I'd like to rotate the logs created by James.
> Should james be restarted after the logrotate runs? Logrotate will
> compress and rename the log files. Problem is, will James create new log
> files after the previous ones be renamed?

I think it should be possible to replace the LogTarget to do what you want
without changing James. The Avalon Log package should have some facilities.
Peter Donald is the expert in that area.
One stop gap hack that may work is replace
org.apache.log.output.FileOutputLogTarget with your own file. This is only
based on code inspection, so don't hold me to it. Your file could do the
rotation, zip and create new file etc.

Harmeet

----- Original Message -----
From: "Oki DZ" <ok...@bdg.pindad.com>
To: <ja...@jakarta.apache.org>
Sent: Tuesday, May 15, 2001 5:15 PM
Subject: Logrotate


>
> Hi,
>
> I'd like to rotate the logs created by James.
> Should james be restarted after the logrotate runs? Logrotate will
> compress and rename the log files. Problem is, will James create new log
> files after the previous ones be renamed?
>
> TIA,
> Oki
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org