Hello I want use SLF4J in my project
I find only this
https://vaadin.com/docs/v8/framework/advanced/advanced-logging.html#advanced.logging.slf4j
Is this actual for Flow 10 & 11?
Hello I want use SLF4J in my project
I find only this
https://vaadin.com/docs/v8/framework/advanced/advanced-logging.html#advanced.logging.slf4j
Is this actual for Flow 10 & 11?
Hello,
to use SLF4J in you project you only need to include the dependency in the pom.xml .
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
and create a log4j.properties file.
# Root logger option
log4j.rootLogger=INFO, stdout
# Redirect log messages to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
You should locate the log4j.properties inside the resources application folder.
After that, you can access the logger this way:
LoggerFactory.getLogger(getClass());
Thank you
How add support logback?
I try show some log info in this example
https://github.com/vaadin/base-starter-spring-gradle
But can’t
My error.