Posts

Showing posts with the label slf4j

How to log slf4j to a file in cuba Framework

How to log slf4j to a file in cuba Framework I'm trying to configure cuba framework in order to write the logs in a file, but at the moment I cannot. I have in the java files: private static final Logger LOG = LoggerFactory.getLogger(BlisterauftragServiceImpl.class); LOG.info("This is a, info log"); In the build.gradle file I have: logbackConfigurationFile = 'etc/war-logback.xml' Then in the folder etc, I have the file war-logback.xml <?xml version="1.0" encoding="UTF-8"?> <configuration debug="false" packagingData="true"> <property name="logDir" value="${app.home}/logs"/> <appender name="File" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${logDir}/app.log</file> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter> ...

Maven Class path error multiple SLF4J bindings

Maven Class path error multiple SLF4J bindings I have been getting this error while trying to do a MAVEN INSTALL. I tried exclusions, but not sure the where to include in pom file. Let me how and what exclusion tags should i include in my pom file. I am also attaching my pom file snippet where to include the exclusions`SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/147188/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/147188/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.10.0/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] POM file: <!-- Start of required part to make log4j work --> <dependency> ...