class LogEnvironmentPostProcessor implements EnvironmentPostProcessor, Ordered {

    public static final int    ORDER                            = ConfigDataEnvironmentPostProcessor.ORDER + 1;

    /**
     * support use config to disable sofa common thread pool monitor.
     */
    public static final String SOFA_THREAD_POOL_MONITOR_DISABLE = "sofa.boot.tools.threadpool.monitor.disable";

    @Override
    public void postProcessEnvironment(ConfigurableEnvironment environment,
                                       SpringApplication application) {
        defaultConsoleLoggers();
        initLoggingConfig(environment);
        initSofaCommonThread(environment);
    }

    @Override
    public int getOrder() {
        return ORDER;
    }

    private void initLoggingConfig(ConfigurableEnvironment environment) {<FILL_FUNCTION_BODY>}

    private void defaultConsoleLoggers() {
        if (SofaBootEnvUtils.isLocalEnv() || SofaBootEnvUtils.isSpringTestEnv()) {
            CommonLoggingConfigurations.loadExternalConfiguration(
                Constants.SOFA_MIDDLEWARE_ALL_LOG_CONSOLE_SWITCH, "true");
        }
    }

    private void loadLogConfiguration(String key, String value, String defaultValue,
                                      Map<String, String> context) {
        if (StringUtils.hasText(value)) {
            context.put(key, value);
        } else {
            context.put(key, defaultValue);
        }
    }

    private void loadLogConfiguration(String key, String value, Map<String, String> context) {
        if (StringUtils.hasText(value)) {
            context.put(key, value);
        }
    }

    private void initSofaCommonThread(ConfigurableEnvironment environment) {
        if (Boolean.parseBoolean(environment.getProperty(SOFA_THREAD_POOL_MONITOR_DISABLE))) {
            System
                .setProperty(SofaThreadPoolConstants.SOFA_THREAD_POOL_LOGGING_CAPABILITY, "false");
        }
    }
}

        Map<String, String> context = new HashMap<>();
        loadLogConfiguration(Constants.LOG_PATH, environment.getProperty(Constants.LOG_PATH),
            Constants.LOGGING_PATH_DEFAULT, context);
        loadLogConfiguration(Constants.OLD_LOG_PATH,
            environment.getProperty(Constants.OLD_LOG_PATH), context.get(Constants.LOG_PATH),
            context);
        loadLogConfiguration(Constants.LOG_ENCODING_PROP_KEY,
            environment.getProperty(Constants.LOG_ENCODING_PROP_KEY), context);
        // Don't delete this!
        // Some old SOFA SDKs rely on JVM system properties to determine log configurations.
        LogEnvUtils.keepCompatible(context, true);

        for (Map.Entry<String, String> entry : context.entrySet()) {
            CommonLoggingConfigurations.loadExternalConfiguration(entry.getKey(), entry.getValue());
        }

        for (PropertySource<?> propertySource : environment.getPropertySources()) {
            if (propertySource instanceof EnumerablePropertySource) {
                for (String key : ((EnumerablePropertySource) propertySource).getPropertyNames()) {
                    if (LogEnvUtils.isSofaCommonLoggingConfig(key)) {
                        CommonLoggingConfigurations.loadExternalConfiguration(key,
                            environment.getProperty(key));
                    }
                }
            }
        }
    
<no_super_class>