You can add "-Dlog4j.configurationFile
" with a customized log4j2.xml
configuration file to the JAVA_ARGS
environment variable before running the gfsh offline compaction command. After offline compaction completes, you can find the generated offlinecompaction_disk_store.log in the current directory.
export JAVA_ARGS="-Dlog4j.configurationFile=offlinecompaction_log4j-debug-logging.xml" gfsh compact offline-disk-store --name=dataDiskStore --disk-dirs=/home/gfadmin/apps/gfExampleCluster/server1/storage/data
Example of offlinecompaction_log4j-debug-logging.xml:
<Configuration status="FATAL" shutdownHook="disable" packages="org.apache.geode.internal.logging.log4j">
<Properties>
<Property name="geode-pattern">[%level{lowerCase=true} %date{yyyy/MM/dd HH:mm:ss.SSS z} [%thread] tid=%hexTid] %message%n%throwable%n</Property>
</Properties>
<Appenders>
<File name="FILE" fileName="offlinecompaction_disk_store.log">
<PatternLayout pattern="${geode-pattern}"/>
</File>
</Appenders>
<Loggers>
<Logger name="org.apache.geode" level="TRACE" additivity="true">
<Filters>
<MarkerFilter marker="RVV_VERBOSE" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="PERSIST_RECOVERY_VERBOSE" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
</Filters>
</Logger>
<Logger name="org.jgroups" level="FATAL" additivity="true"/>
<Root level="TRACE">
<AppenderRef ref="FILE"/>
</Root>
</Loggers>
</Configuration>