Logger doesn't write to file Log4J
<p>I don't understand why my Log4J is not logging to file. Ive been looking many similar posts but none helped me. I configured all correctly, but it doesn't log to the file.</p>

<p>Let me show you, this is the config log4J.properties:</p>

<pre><code># Root logger option
log4j.rootLogger=INFO, file, stdout

# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=log.out
log4j.appender.file.ImmediateFlush=true
log4j.appender.file.MaxFileSize=1024MB
log4j.appender.file.MaxBackupIndex=1
log4j.appender.file.Append=true
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
</code></pre>

<p>And this is how I use the Logger:</p>

<pre><code>import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

...

private Logger logger = LoggerFactory.getLogger(GameBoardService.class);


...

logger.info("log this text into file....");
</code></pre>