public Logger logger(String clazz) {
        Logger logger = LoggerFactory.getLogger(clazz);
        if (logger instanceof LocationAwareLogger) {
            return new LocationAwareKafkaLogger(logPrefix, (LocationAwareLogger) logger);
        } else {
            return new LocationIgnorantKafkaLogger(logPrefix, logger);
        }
    }
This class provides a way to instrument loggers with a common context which can be used to
automatically enrich log messages.
s3stream/src/main/java/com/automq/stream/utils/LogContext.java