<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2016-2022 Hedera Hashgraph, LLC
  ~
  ~ This software is the confidential and proprietary information of
  ~ Hedera Hashgraph, LLC. ("Confidential Information"). You shall not
  ~ disclose such Confidential Information and shall use it only in
  ~ accordance with the terms of the license agreement you entered into
  ~ with Hedera Hashgraph.
  ~
  ~ HEDERA HASHGRAPH MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  ~ THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  ~ TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  ~ PARTICULAR PURPOSE, OR NON-INFRINGEMENT. HEDERA HASHGRAPH SHALL NOT BE LIABLE FOR
  ~ ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  ~ DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  -->

<!-- monitorInterval="600" , if any change to log level will be effective after 10 minute -->
<Configuration status="WARN" monitorInterval="600">
    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %-4L %c{1} - %m{nolookups}%n"/>
        </Console>

        <RollingFile name="RollingFile" fileName="output/hgcaa.log"
                     filePattern="output/hgcaa-%d{yyyy-MM-dd}-%i.log.gz">
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %-4L %c{1} - %m{nolookups}%n</pattern>
            </PatternLayout>
            <Policies>
                <TimeBasedTriggeringPolicy/>
                <SizeBasedTriggeringPolicy size="100 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="10">
                <Delete basePath="output" maxDepth="3">
                    <IfFileName glob="hgcaa-*.log.gz">
                        <IfLastModified age="P3D"/>
                    </IfFileName>
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>

        <RollingFile name="QueriesRollingFile" fileName="output/queries.log"
                     filePattern="output/queries-%d{yyyy-MM-dd}-%i.log.gz">
            <BurstFilter level="INFO" rate="50" maxBurst="500"/>
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %-4L %c{1} - %m{nolookups}%n</pattern>
            </PatternLayout>
            <Policies>
                <TimeBasedTriggeringPolicy/>
                <SizeBasedTriggeringPolicy size="100 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="10">
                <Delete basePath="output" maxDepth="3">
                    <IfFileName glob="queries-*.log.gz">
                        <IfLastModified age="P3D"/>
                    </IfFileName>
                </Delete>
            </DefaultRolloverStrategy>
        </RollingFile>

        <RollingFile name="fileLog" fileName="output/swirlds.log"
                     filePattern="output/swirlds-%d{yyyy-MM-dd}-%i.logz">
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-8sn %-5p %-16marker &lt;%t&gt; %c{1}: %msg%n</pattern>
            </PatternLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size="500 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="1" />
        </RollingFile>

        <RollingFile name="vMapLog" fileName="output/swirlds-vmap.log"
                     filePattern="output/swirlds-vmap-%d{yyyy-MM-dd}-%i.log">
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-8sn %-5p %-16marker &lt;%t&gt; %c{1}: %msg%n</pattern>
            </PatternLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size="25 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="50" />
        </RollingFile>

        <!-- Platform hash stream logs -->
        <RollingFile name="swirldsHashStream" fileName="output/swirlds-hashstream/swirlds-hashstream.log"
                     filePattern="output/swirlds-hashstream/swirlds-hashstream-%d{yyyy-MM-dd}-%i.log.gz">
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-8sn %-5p %-16marker &lt;%t&gt; %c{1}: %msg%n</pattern>
            </PatternLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size="500 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="1"/>
        </RollingFile>

        <!-- JSON formatted output -->
        <RollingRandomAccessFile name="swirldsPrimaryJsonLog" fileName="output/swirlds.json"
                                 filePattern="output/swirlds-%d{yyyy-MM-dd}-%i.json">
            <JsonLayout>
                <!-- ensure there is a newline after each entry -->
                <eventEol>true</eventEol>
                <!-- don't add whitespace in the middle of an entry -->
                <compact>true</compact>
                <!-- stack traces are SUPER long in json format, don't include them -->
                <includeStacktrace>false</includeStacktrace>
            </JsonLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size="500 MB"/>
            </Policies>
            <DefaultRolloverStrategy max="1"/>
        </RollingRandomAccessFile>

        <!-- State logs -->
        <RollingFile name="StateLogs" fileName="output/state/state-changes.log"
                     filePattern="output/state/state-changes-%i.log">
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} - %m{nolookups}%n</pattern>
            </PatternLayout>
            <SizeBasedTriggeringPolicy size="50 MB" />
            <DefaultRolloverStrategy max="10"/>
        </RollingFile>

    </Appenders>
    <Loggers>
        <Root level="FATAL">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="fileLog"/>
        </Root>

        <Logger name="com.swirlds" level="ALL" additivity="false">
            <AppenderRef ref="fileLog">
                <Filters>
                    <!-- JasperDB / MerkleDb & Virtual Merkle -->
                    <MarkerFilter marker="JASPER_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="MERKLE_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="STATE_HASH" onMatch="DENY" onMismatch="NEUTRAL"/>
                </Filters>
            </AppenderRef>

            <AppenderRef ref="swirldsPrimaryJsonLog">
                <Filters>
                    <!-- JasperDB / MerkleDb & Virtual Merkle -->
                    <MarkerFilter marker="JASPER_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="MERKLE_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="STATE_HASH" onMatch="DENY" onMismatch="NEUTRAL"/>
                </Filters>
            </AppenderRef>

            <AppenderRef ref="vMapLog">
                <Filters>
                    <!-- JasperDB / MerkleDb & Virtual Merkle -->
                    <MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY"/>
                </Filters>
            </AppenderRef>

            <AppenderRef ref="swirldsHashStream">
                <Filters>
                    <!-- Hash stream log -->
                    <MarkerFilter marker="STATE_HASH" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY"/>
                </Filters>
            </AppenderRef>

            <!--
            Due to known log4j2 issues with how Markers and LogLevels are evaluated there must be a top level <Filter> element
            to ensure that the root logger does not execute all the lambda arguments erroneously. Potential work around in the
            future is to use a top-level <Filter> and <Logger> specific filters in combination to achieve the desired
            multi-logger setup for diagnostic logging.
            -->
            <Filters>
                <!-- Filter out levels above INFO (ex: DEBUG & TRACE) -->
                <!-- Intentionally left disabled by default -->
                <!-- <ThresholdFilter level="INFO"                 onMatch="NEUTRAL" onMismatch="DENY" />-->

                <!-- In the following, enable a marker with onMatch="ACCEPT" and disable with onMatch="DENY". -->
                <!-- More markers can be added, but ensure that every onMismatch="NEUTRAL", except the last is "DENY". -->

                <!-- Exceptions -->
                <MarkerFilter marker="EXCEPTION" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="TESTING_EXCEPTIONS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SOCKET_EXCEPTIONS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="TCP_CONNECT_EXCEPTIONS" onMatch="DENY" onMismatch="NEUTRAL"/>

                <!-- Errors -->
                <MarkerFilter marker="INVALID_EVENT_ERROR" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Synchronization/Gossip (Debug) -->
                <MarkerFilter marker="SYNC_START" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SYNC_DONE" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SYNC_ERROR" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SYNC" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="HEARTBEAT" onMatch="DENY" onMismatch="NEUTRAL"/>

                <!-- Platform Events (Debug) -->
                <MarkerFilter marker="CREATE_EVENT" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="INTAKE_EVENT" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="WATCH_EVENTS_SEND_REC" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_SIG" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_STREAM" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_RESTART" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STALE_EVENTS" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_PARSER" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_CONTENT" onMatch="DENY" onMismatch="NEUTRAL"/>

                <!-- Queues/Certificates/Utilities -->
                <MarkerFilter marker="QUEUES" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="CERTIFICATES" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="LOCKS" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="TIME_MEASURE" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="THREADS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Signed State Signatures -->
                <MarkerFilter marker="STATE_SIG_DIST" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STATE_DELETER" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="OBJECT_STREAM_DETAIL" onMatch="DENY" onMismatch="NEUTRAL"/>

                <!-- Cryptography -->
                <MarkerFilter marker="OPENCL_INIT_EXCEPTIONS" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="ADV_CRYPTO_SYSTEM" onMatch="DENY" onMismatch="NEUTRAL"/>

                <!-- Startup/Restart/Reconnect -->
                <MarkerFilter marker="STARTUP" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="PLATFORM_STATUS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="RECONNECT" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FREEZE" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Saved States -->
                <MarkerFilter marker="SNAPSHOT_MANAGER" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STATE_TO_DISK" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STATE_HASH" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Beta Mirror -->
                <MarkerFilter marker="BETA_MIRROR_NODE" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- FCMap -->
                <MarkerFilter marker="FCM_COPY" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FCM_COPY_FROM" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FCM_COPY_TO" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FCM_DEMO" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FCM_COPY_FROM_DIFF" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FCM_COPY_TO_DIFF" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FC_SERIALIZATION" onMatch="DENY" onMismatch="NEUTRAL"/>

                <!-- Merkle Trees & Hashing -->
                <MarkerFilter marker="MERKLE_FORCE_FLUSH" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="MERKLE_HASHING" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="MERKLE_GENERATION" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="MERKLE_LOCKS" onMatch="DENY" onMismatch="NEUTRAL"/>

                <!-- JasperDB / MerkleDb & Virtual Merkle -->
                <MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Migration -->
                <MarkerFilter marker="MIGRATION" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Platform Testing App -->
                <MarkerFilter marker="DEMO_INFO" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="DEMO_QUORUM" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SAVE_EXPECTED_MAP" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="DEMO_STAT" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="DEMO_TRANSACTION_INFO" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="DEMO_MAP" onMatch="DENY" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EXPIRATION" onMatch="DENY" onMismatch="NEUTRAL"/>

                <MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY"/>
            </Filters>
        </Logger>

        <Logger name="org.hiero" level="INFO" additivity="false">
            <AppenderRef ref="fileLog">
                <Filters>
                    <!-- MerkleDb & Virtual Merkle -->
                    <MarkerFilter marker="MERKLE_DB"              onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="VIRTUAL_MERKLE_STATS"   onMatch="DENY" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="STATE_HASH"             onMatch="DENY" onMismatch="NEUTRAL"/>
                </Filters>
            </AppenderRef>

            <AppenderRef ref="vMapLog">
                <Filters>
                    <!-- MerkleDb & Virtual Merkle -->
                    <MarkerFilter marker="MERKLE_DB"              onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="VIRTUAL_MERKLE_STATS"   onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="DISABLED"               onMatch="DENY"   onMismatch="DENY" />
                </Filters>
            </AppenderRef>

            <AppenderRef ref="swirldsHashStream">
                <Filters>
                    <!-- Hash stream log -->
                    <MarkerFilter marker="STATE_HASH"             onMatch="ACCEPT"  onMismatch="NEUTRAL"/>
                    <MarkerFilter marker="DISABLED"               onMatch="DENY"    onMismatch="DENY" />
                </Filters>
            </AppenderRef>

            <!--
            Due to known log4j2 issues with how Markers and LogLevels are evaluated there must be a top level <Filter> element
            to ensure that the root logger does not execute all the lambda arguments erroneously. Potential work around in the
            future is to use a top-level <Filter> and <Logger> specific filters in combination to achieve the desired
            multi-logger setup for diagnostic logging.
            -->
            <Filters>
                <!-- Filter out levels above INFO (ex: DEBUG & TRACE) -->
                <!-- Intentionally left disabled by default -->
                <!-- <ThresholdFilter level="INFO"                 onMatch="NEUTRAL" onMismatch="DENY" />-->

                <!-- In the following, enable a marker with onMatch="ACCEPT" and disable with onMatch="DENY". -->
                <!-- More markers can be added, but ensure that every onMismatch="NEUTRAL", except the last is "DENY". -->

                <!-- Exceptions -->
                <MarkerFilter marker="EXCEPTION"              onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="TESTING_EXCEPTIONS"     onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SOCKET_EXCEPTIONS"      onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="TCP_CONNECT_EXCEPTIONS" onMatch="DENY"   onMismatch="NEUTRAL"/>

                <!-- Errors -->
                <MarkerFilter marker="INVALID_EVENT_ERROR"    onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Synchronization/Gossip (Debug) -->
                <MarkerFilter marker="SYNC_START"             onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SYNC_DONE"              onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SYNC_ERROR"             onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="SYNC"                   onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="HEARTBEAT"              onMatch="DENY"   onMismatch="NEUTRAL"/>

                <!-- Platform Events (Debug) -->
                <MarkerFilter marker="CREATE_EVENT"           onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="INTAKE_EVENT"           onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="WATCH_EVENTS_SEND_REC"  onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_SIG"              onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_STREAM"           onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_RESTART"          onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STALE_EVENTS"           onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_PARSER"           onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="EVENT_CONTENT"          onMatch="DENY"   onMismatch="NEUTRAL"/>

                <!-- Queues/Certificates/Utilities -->
                <MarkerFilter marker="QUEUES"                 onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="CERTIFICATES"           onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="LOCKS"                  onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="TIME_MEASURE"           onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="THREADS"                onMatch="ACCEPT"   onMismatch="NEUTRAL"/>

                <!-- Signed State Signatures -->
                <MarkerFilter marker="STATE_SIG_DIST"         onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STATE_DELETER"          onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="OBJECT_STREAM_DETAIL"   onMatch="DENY"   onMismatch="NEUTRAL"/>

                <!-- Cryptography -->
                <MarkerFilter marker="OPENCL_INIT_EXCEPTIONS" onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="ADV_CRYPTO_SYSTEM"      onMatch="DENY"   onMismatch="NEUTRAL"/>

                <!-- Startup/Restart/Reconnect -->
                <MarkerFilter marker="STARTUP"                onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="PLATFORM_STATUS"        onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="RECONNECT"              onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="FREEZE"                 onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Saved States -->
                <MarkerFilter marker="SNAPSHOT_MANAGER"       onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STATE_TO_DISK"          onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="STATE_HASH"             onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Beta Mirror -->
                <MarkerFilter marker="BETA_MIRROR_NODE"       onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <!-- Merkle Trees & Hashing -->
                <MarkerFilter marker="MERKLE_FORCE_FLUSH"     onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="MERKLE_HASHING"         onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="MERKLE_GENERATION"      onMatch="DENY"   onMismatch="NEUTRAL"/>
                <MarkerFilter marker="MERKLE_LOCKS"           onMatch="DENY"   onMismatch="NEUTRAL"/>

                <!-- MerkleDb & Virtual Merkle -->
                <MarkerFilter marker="MERKLE_DB"              onMatch="ACCEPT" onMismatch="NEUTRAL"/>
                <MarkerFilter marker="VIRTUAL_MERKLE_STATS"   onMatch="ACCEPT" onMismatch="NEUTRAL"/>

                <MarkerFilter marker="DISABLED"               onMatch="DENY"   onMismatch="DENY" />
            </Filters>
        </Logger>

        <Logger name="com.hedera" level="info" additivity="false">
            <AppenderRef ref="Console"/>
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.sigs" level="error" additivity="false">
            <AppenderRef ref="Console"/>
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.queries.answering" level="warn" additivity="false">
            <AppenderRef ref="QueriesRollingFile"/>
        </Logger>

        <Logger name="com.hedera.services.legacy" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.netty" level="info" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.service" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.services" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.handler" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.utils.UnzipUtility" level="info" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.utils" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.hgcca.core" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.evm" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.initialization" level="warn" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="com.hedera.services.legacy.config" level="info" additivity="false">
            <AppenderRef ref="RollingFile"/>
            <AppenderRef ref="Console"/>
        </Logger>

        <!-- Send state logs to their own appender   -->
        <Logger name="com.swirlds.state.merkle.logging.StateLogger" level="info" additivity="false">
            <AppenderRef ref="RollingFile"/>
        </Logger>

        <Logger name="org.springframework" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="state" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="trie" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="net" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="execute" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="VM" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="pending" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="sync" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="wire" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="db" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="general" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="TCK-Test" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="org.hibernate" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="repository" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="blockchain" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="mine" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="blockqueue" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="rlp" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="java.nio" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="io.netty" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="io.grpc" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="discover" level="WARN" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
        <Logger name="hsqldb.db" level="ERROR" additivity="false">
            <!-- <AppenderRef ref="Console"/> -->
            <AppenderRef ref="RollingFile"/>
        </Logger>
    </Loggers>
</Configuration>
