How to dump Server + Audit logs in a .json file

I am struggling with setting up the logging into a flat json file. In a non-opendistro version of Elasticsearch, the below log4j setting works:-

######## Server JSON ############################
appender.rolling.type = RollingFile
appender.rolling.name = rolling
appender.rolling.fileName = /usr/share/elasticsearch/logs/es_server.json
appender.rolling.layout.type = ESJsonLayout
appender.rolling.layout.type_name = server
appender.rolling.filePattern = /usr/share/elasticsearch/logs/es-%d{yyyy-MM-dd}-%i.json.gz
appender.rolling.policies.type = Policies
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling.policies.time.interval = 1
appender.rolling.policies.time.modulate = true
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size = 256MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.fileIndex = nomax
appender.rolling.strategy.action.type = Delete
appender.rolling.strategy.action.basepath = /usr/share/elasticsearch/logs
appender.rolling.strategy.action.condition.type = IfFileName
appender.rolling.strategy.action.condition.glob = es-*
appender.rolling.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
appender.rolling.strategy.action.condition.nested_condition.exceeds = 2GB
################################################

The setting above works in normal distribution of Elasticsearch and dumps server logs into a .json file. But the same setting is not working with the Opendistro distribution of Elasticsearch. I am getting an empty .json file.

What I am trying to achieve is, dump Server + Audit logs into a single .json file.