Glassfish 玻璃鱼4:如何每天旋转原木

Glassfish 玻璃鱼4:如何每天旋转原木,glassfish,glassfish-4,Glassfish,Glassfish 4,我用的是玻璃鱼。我想每天轮换原木。这意味着我每天都喜欢新的日志。我曾尝试在http:localhost:4848的管理控制台上更改属性,但它对我不起作用。以下是我尝试过的: Configurations\default-config\Logger Settings and I set the checkbox for Rotation on Date Change 而且 Configurations\server-config\Logger Settings and I set the c


我用的是玻璃鱼。我想每天轮换原木。这意味着我每天都喜欢新的日志。我曾尝试在http:localhost:4848的管理控制台上更改属性,但它对我不起作用。以下是我尝试过的:

 Configurations\default-config\Logger Settings and I set the checkbox for Rotation on Date Change
而且

 Configurations\server-config\Logger Settings and I set the checkbox for Rotation on Date Change

任何帮助都将不胜感激。谢谢。

您可以从命令行使用asadmin:

./asadmin --host localhost --port 4848 --user admin set-com.sun.enterprise.server.logging.GFFileHandler.rotationOnDateChange=true

如果需要,可以使用配置保留日志

asadmin>设置日志属性 com.sun.enterprise.server.logging.GFFileHandler.maxHistoryFiles=10


修改这些设置后,是否重新启动域?重新启动域是什么意思?我使用Netbeans停止并重新启动glassfish服务器。当您重新启动glassfish时,是否在服务器配置->记录器设置下选中了日期更改旋转复选框,您可以检查
/glassfish/domains/domain1/config/logging.properties
并确保此属性设置正确:
com.sun.enterprise.server.logging.GFFileHandler.rotationAndTechange=true
@IanEvans当我重新启动glassfish时,在服务器配置->记录器设置下选中日期更改时的旋转复选框。我还查看了logging.properties文件,并设置了RotationAndTechChange=true属性。还有其他建议吗?