This is my code:
public class main {
static Logger log = Logger.getLogger("s");
static Logger log1 = Logger.getLogger("R");

public static void main(String args[]) {
log.debug("message.1");
log1.info("message.2");
log.warn("message.3");
log1.error("message.4");
log.fatal("message.5");
}
}

this is my log4j.properties:
log4j.rootLogger=TRACE, s,R

log4j.appender.s=org.apache.log4j.ConsoleAppender
log4j.appender.s.layout=org.apache.log4j.PatternLa yout
log4j.appender.s.layout.ConversionPattern=[%5p] %d{mm:ss} (%F:%M:%L)%n%m%n%n

log4j.appender.R=org.apache.log4j.RollingFileAppen der
log4j.appender.R.File=c:\\logi\\xxx3.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLa yout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.appender.R.additivity=false

I have 2 appenders and i want 2 independent outputs.

on console:
message.1
message.3
message.5

in file:
message.2
message.4

Help me.... configure log4j.properties

Greetings.