users@glassfish.java.net

Re: asadmin command to rotate the logs?

From: Jane Young <Jane.Young_at_Sun.COM>
Date: Thu, 26 Feb 2009 12:05:10 -0800

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
> <mailto: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
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
>
>