<commit_before>package de.codecentric.batch.listener;

import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.core.Ordered;

/**
 * This ApplicationListener makes the batch.joblog.path available before the LoggingSystem is started.
 * @author <NAME>
 */
public class LoggingApplicationListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent>, Ordered {

	@Override
	public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
		String jobLogPath = event.getEnvironment().getProperty("batch.joblog.path");
		if (!StringUtils.isEmpty(jobLogPath)) {
		        if (!jobLogPath.endsWith("/")) {
			        jobLogPath = jobLogPath + "/";
		        }
			System.setProperty("JOB_LOG_PATH", jobLogPath);
		}
	}

	@Override
	public int getOrder() {
		return Ordered.HIGHEST_PRECEDENCE + 10;
	}

}<commit_msg>React on org.springframework.boot.context.event.ApplicationPreparedEvent for Log Init<commit_after>package de.codecentric.batch.listener;

import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.context.event.ApplicationPreparedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.core.Ordered;

/**
 * This ApplicationListener makes the batch.joblog.path available before the LoggingSystem is started.
 * @author <NAME>
 */
public class LoggingApplicationListener implements ApplicationListener<ApplicationPreparedEvent>, Ordered {

    @Override
    public void onApplicationEvent(ApplicationPreparedEvent event) {
            String jobLogPath = event.getApplicationContext().getEnvironment().getProperty("batch.joblog.path");
            if (!StringUtils.isEmpty(jobLogPath)) {
                    if (!jobLogPath.endsWith("/")) {
                            jobLogPath = jobLogPath + "/";
                    }
                    System.setProperty("JOB_LOG_PATH", jobLogPath);
            }
    }

    @Override
    public int getOrder() {
            return Ordered.HIGHEST_PRECEDENCE + 10;
    }

}

{'fraction_non_alphanumeric': 0.09740259740259741, 'fraction_numerical': 0.0027829313543599257, 'mean_word_length': 3.869074492099323, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4232691', 'n_tokens_mistral': 588, 'n_tokens_neox': 563, 'n_words': 109}