Need to make a log
Did as in this example .
log4j.configuration=file:///${com.sun.aas.instanceRoot}/config/log4j.properties On the local machine running. But when I uploaded it to a remote server, it does not record anything in log4j.log or in server.log .
On remote there are several records of Glassfish. I think the problem is this.
Path: /opt/glassfish3/glassfish/domains/domain1
In addition to opt there are a few more directories with glassfish3.
Question: what should be the property?
If the problem is different, then tell me.
The log4j.properties file itself:
log4j.rootLogger=DEBUG, FILE log4j.logger.myapp=DEBUG log4j.appender.FILE=org.apache.log4j.RollingFileAppender log4j.appender.FILE.File=/opt/glassfish3/glassfish/domains/domain1/logs/log4j.log log4j.appender.FILE.MaxFileSize=1MB log4j.appender.file.MaxBackupIndex=10 log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d{DATE} %-5p %c{1} : %m%n I tried to write to server.log - it turned out, but in log4j.log it does not work