Spring Download the application. Logger does not log DEBUG messages

I have application.yml with the following lines:

logging:
    file: logs/keyserver.log
    level:
        org.springframework.web: 'DEBUG'

It works fine except in this case:

public class TransactionBuilder extends Wallet {

    private final Logger LOG = LoggerFactory.getLogger(TransactionBuilder.class);

    @Override
    public RedeemData findRedeemDataFromScriptHash(byte[] payToScriptHash) {
        LOG.debug("payToScriptHash = " + HEX.encode(payToScriptHash));
    }

}

Messages are not displayed either in the log file or on the screen.

However

LOG.info("payToScriptHash = " + HEX.encode(payToScriptHash));
LOG.error("payToScriptHash = " + HEX.encode(payToScriptHash));

works great.

+4
source share
1 answer

I assume your class is TransactionBuildernot in the package org.springframework.web. Just add your package to the registration section of your configuration:

logging:
    file: logs/keyserver.log
    level:
        org.springframework.web: 'DEBUG'
        your.package: 'DEBUG'
+6
source

All Articles