0

I have a project running with embedded Jetty 7 that must logging in file. I am using Slf4j + Logback. When I run with Eclipse, it works as expected, but when I export to a jar file and try to run in a prompt, the configurations of logback are skipped.

I use this to generate the file:

RolloverFileOutputStream os = new RolloverFileOutputStream("C:/logs/yyyy_mm_dd_project.log", true);
PrintStream logStream = new PrintStream(os);
System.setOut(logStream);
System.setErr(logStream);

I also put the logback.xml in src/main/resources.

What is my mistake? Tks

1 Answers1

0

Fixed following this:

Configure logging for Jetty's maven plugin?

I changed the pom.xml and generate the jar by Maven. Problem fixed.

Community
  • 1
  • 1