<commit_before><commit_msg>add utils with Guice config, extension method for loggers (@Any class)<commit_after>package eu.dzim.test.kotlin

import com.google.inject.AbstractModule
import eu.dzim.shared.resource.BaseResource
import eu.dzim.shared.resource.Resource
import eu.dzim.test.model.TestModel
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
import java.util.*

class ResourceImpl : BaseResource("i18n", "strings", Locale.ENGLISH)

// could use eu.dzim.shared.guice.BaseGuiceModule instead
class GuiceModule(private val testModel: TestModel) : AbstractModule() {

    private val resource = ResourceImpl()

    override fun configure() {
        logger.info("Configure Guice.")
        bind(Resource::class.java).toInstance(resource)
        bind(TestModel::class.java).toInstance(testModel)
    }

    companion object {
        private val logger by lazy { getLogger() }
    }
}

inline fun Any.getLogger(): Logger = LogManager.getLogger(this::class.qualifiedName)
{'fraction_non_alphanumeric': 0.10834990059642147, 'fraction_numerical': 0.003976143141153081, 'mean_word_length': 4.56353591160221, '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': '2274209', 'n_tokens_mistral': 299, 'n_tokens_neox': 293, 'n_words': 65}