Skip to main content

Log file settings

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
mercnboy3
Offline
Joined: 2005-12-29

I need to move my log files to a different drive in glassfish. Under server-config/logger settings/log file so far I have tried:

D:/glassfish_logs/${com.sun.aas.domain}/logs/server.log
D:/glassfish_logs/${com.sun.aas.domainName}/logs/server.log
D:/glassfish_logs/${domainName}/logs/server.log

The logs are relocated but the name of the domain is not substituted. What is the system property that grabs the name of domain and sticks it in there?

Also,

How do you tell glassfish to only keep the last x number of log files. I see no setting for this anywhere.

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
AndyOverton
Offline
Joined: 2013-08-02

Hi,

Not sure on the first issue. ${com.sun.aas.domainName} should work.

You can set the max number of files to keep with the following:

asadmin set server.http-service.access-log.max-history-files=number_of_files.

Regards,

Andy Overton

C2B2 Expert Support
http://www.c2b2.co.uk/support