J2ee applications are deployed in tomcat. Why is the application log output to tomcat’s catalina.out?

  java, question

J2ee application is deployed in tomcat (linux), and logs are expected to be input into the file inside configured in log4j.properties.
The contents of log4j.properties in the categories directory are as follows:

log4j.rootLogger=INFO,file
 log4j.appender.file=org.apache.log4j.RollingFileAppender
 log4j.appender.file.Append=true
 log4j.appender.file.MaxFileSize=1024KB
 log4j.appender.file.Threshold=INFO
 **log4j.appender.file.file=/opt/tomcat-myapp/logs/myapp.log**
 log4j.appender.file.MaxBackupIndex=10
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 Log4j.appender.file.layout.conversionpattern = percentage-d {yyy-mm-ddhh: mm: ss} [percentage c]-[ percentage p] percentage m percentage n

Java code:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.quartz.Job;
import java.io.Serializable;

public ABC implements Job,Serializable {
private static final Logger logger = LoggerFactory.getLogger(ABC.class);
public void execute(JobExecutionContext context) throws JobExecutionException {
logger.info(“test…..”);
bracket
bracket

However, it was found that only a small part of the log information in myapp.log logeer.info (…) in the code was entered into tomcat’s catalina.out How to solve it?

Did you get the log object through the myapp name you configured when you got the log object in the class? Getting it through. class will definitely be output to catalina.out