users@glassfish.java.net

Re: asadmin command to rotate the logs?

From: Jon Faldmo <jfaldmo_at_gmail.com>
Date: Thu, 26 Feb 2009 13:37:54 -0700

Thanks for the reply. I haven't tried it with Glassfish but when I was
working with another App server years ago, when I rename the log file and
create a new a new server.log file the app server still writes to the
renamed log file. I would have to stop the instance in order to rename the
log file. There are work arounds like copying the log file and then delete
the contents of the original log file but that isn't very clean to do.

On Thu, Feb 26, 2009 at 1:05 PM, Jane Young <Jane.Young_at_sun.com> wrote:

> That's a really cool feature in Admin Console I didn't know about. Thanks
> for the details.
> There is no equivalent feature in asadmin. You'll have to manually rename
> the server.log file or you can write a script to do this.
>
> The Admin Console team will be able to answer the question about why the
> log file does not get rotated if the instance is not running.
>
> Thanks,
> Jane
>
>
>
> Jon Faldmo wrote:
>
> In the Admin Console you can select an instance from the navigation tree.
> The General Information is shown and a row of buttons is displayed. One of
> those buttons is a "Rotate Log" button. When you press it the instance logs
> get rotated, i.e. the server.log file is renamed to server.log.<timestamp>
> and an empty server.log is created and logging continues in a "fresh" log.
>
> Is there a way to rotate the instance logs without going through the Admin
> Console?
>
> A second question is I've noticed the log only get rotate if the instance
> is running. If it is stopped and I hit that button the log does not get
> rotated. I have to manaully rename (mv) the log before starting the
> instance. Is this how it is supposed to work?
>
> On Thu, Feb 26, 2009 at 12:30 PM, Jane Young <Jane.Young_at_sun.com> wrote:
>
> What do you mean by rotate the logs?
>
>
> Jon Faldmo wrote:
>
> Is there an asadmin command to rotate the logs? I couldn't find one in the
> reference guide for version Sun Java System Application Server 9.1_02.
> Thanks,
> Jon
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>
>