Hi I have recently migrated the logging from log4j to log4j2 in my spring project.
Everything is working fine as expected but I wish to know how I can set the properties
<SizedBasedTriggeringPolicy size="10MB" /> and <DefaultRolloverPolicy max="80" /> in my log4j2 config file by directly picking up the value from the given system argument for Rolling File Appender.
In log4j I used to use <param name="MaxFileSize" value="10MB" />
and <param name="MaxBackupIndex" value="80" /> in my RollingFileAppender default configuration and could override the parameter value by passing myAppenderLoggerName.MaxBackupIndex = my-value and myAppenderLoggerName.MaxFileSize = my-value as system properties args.
I'm aware I can use $(sys:my-parameter-name:-default-value) in log4j2 for substitution but is there a direct approach through which I can override the parameter by referencing it's property name directly in log4j2 like it was there is log4j like say myAppender.paramterNameForRolloverSizeInLog4j2 = my-value ?