<commit_before>package com.aquent.viewtools;

import org.osgi.framework.BundleContext;
import com.dotmarketing.osgi.GenericBundleActivator;

/**
 * SpamMeNot Viewtool Activator.
 * @author cfalzone
 */
public class SpamMeNotActivator extends GenericBundleActivator {

    @Override
    public void start(BundleContext bundleContext) throws Exception {

        //Initializing services...
        initializeServices(bundleContext);

        //Registering the ViewTool service
        registerViewToolService(bundleContext, new SpamMeNotInfo());
    }

    @Override
    public void stop(BundleContext bundleContext) throws Exception {
        unregisterViewToolServices();
    }

}<commit_msg>WEB-5220 - Setup Proper Logging<commit_after>package com.aquent.viewtools;

import org.osgi.framework.BundleContext;

import com.dotcms.repackage.org.apache.logging.log4j.LogManager;
import com.dotcms.repackage.org.apache.logging.log4j.core.LoggerContext;
import com.dotmarketing.loggers.Log4jUtil;
import com.dotmarketing.osgi.GenericBundleActivator;

/**
 * SpamMeNot Viewtool Activator.
 * @author cfalzone
 */
public class SpamMeNotActivator extends GenericBundleActivator {
    private LoggerContext pluginLoggerContext;

    @Override
    public void start(BundleContext bundleContext) throws Exception {
        // Setup Logger
        LoggerContext dotcmsLoggerContext = Log4jUtil.getLoggerContext();
        pluginLoggerContext = (LoggerContext) LogManager.getContext(this.getClass().getClassLoader(),
            false, dotcmsLoggerContext, dotcmsLoggerContext.getConfigLocation());

        //Initializing services...
        initializeServices(bundleContext);

        //Registering the ViewTool service
        registerViewToolService(bundleContext, new SpamMeNotInfo());
    }

    @Override
    public void stop(BundleContext bundleContext) throws Exception {
        unregisterViewToolServices();
        unpublishBundleServices();
        unregisterServices(bundleContext);
        Log4jUtil.shutdown(pluginLoggerContext);
    }

}
{'fraction_non_alphanumeric': 0.08235294117647059, 'fraction_numerical': 0.004411764705882353, 'mean_word_length': 4.002450980392157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3519876', 'n_tokens_mistral': 549, 'n_tokens_neox': 535, 'n_words': 108}