How to manually configure logging in spring?

46 views Asked by At

I have my own code for configuring logging (logback):

val appender = // complex appender logic
val context = LoggerFactory.getILoggerFactory() as LoggerContext
val rootLogger = context.getLogger(Logger.ROOT_LOGGER_NAME)!!
rootLogger.addAppender(appender)

how can i plug this code into spring? ideally i would like to get some properties using spring and then use those properties to build the appender

0

There are 0 answers