Hello my current project requires me to, as the title suggests, log to the console when, a developer is running the application on their machine , and log to a rolling log file when the application is running on the server. So far I've created a log4j2.properties file (see below) and it logs to both the console and rolling log file just fine. I've researched and I have seen examples on the Apache website, and others, using a Routing appender, but all of the examples have used a log4j2.xml file. Is it possible to create this using a log4j2.properties file? Thank you.
status = error
dest = err
name = PropertiesConfig
property.filename = C:\\MyApplications\\ExampleApplication\\Example.log
filter.threshold.type = ThresholdFilter
filter.threshold.level = debug
#LOG TO CONSOLE
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%t] %-5level %logger{1} - %m%n
appender.console.filter.threshold.type = ThresholdFilter
appender.console.filter.threshold.level = debug
#LOG TO ROLLING FILE
appender.rolling.type = RollingFile
appender.rolling.name = RollingFile
appender.rolling.fileName = ${filename}
appender.rolling.filePattern = ExampleLogBackup-%d{MM-dd-yy}-%i.log.gz
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = %d{HH:mm:ss.SSS} [%t] %-5level %logger{1} - %m%n
appender.rolling.policies.type = Policies
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling.policies.time.interval = 10
appender.rolling.policies.time.modulate = true
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size=1MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 20
logger.rolling.name = com.myapp.example
logger.rolling.level = debug
logger.rolling.additivity = true
logger.rolling.appenderRef.rolling.ref = RollingFile
rootLogger.level = debug
rootLogger.appenderRef.stdout.ref = STDOUT