0

I am trying to deploy a couple of servlets in glassfish . Both work but I just get one of them printing logs in its own file. The other I don't know to to do it.

I followed this tutorial to make it works for one log: http://hwellmann.blogspot.com.es/2010/12/glassfish-logging-with-slf4j-part-2.html

I tried to add logback.xml content from one servlet to the other one so I just have one file, but it doesn't work. I also tried to add a second logback, logback2.xml and add it to jvm options. Also failed...

Any idea? I haven't found anything about this on the internet

Biribu
  • 3,615
  • 13
  • 43
  • 79

1 Answers1

0

Ok, I solved it.

I comment my answer because I lost lot of time fixing this. So if anyone can solve it in minutes, good for him.

In logback.xml you have to add the FILE section and the classes which use it for each servlet. After that, upload the servlets to glassfish and restart it. Then it will work. Pretty easy!

Biribu
  • 3,615
  • 13
  • 43
  • 79