File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlet loggin not working (log4j) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet loggin not working (log4j)" Watch "servlet loggin not working (log4j)" New topic

servlet loggin not working (log4j)

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
As suggested by someone oy you I tried to implemet in my servlet the log4j, but it isn't log anything.
Can anyone of you have look and tell me where the mistake is?

  • first I placed the log4j-1.2.13.jar in the lib folder.
  • then I wrote a configuration file:

  • the folder indicated has write permits,
  • I placed this config. file in the class folder.
  • [list]In my servlet I inserted this code: [/list]
    in the init
    and in the catch statement

    Please, have a look, and tell if I made any mistakes.
    ps: any other suggestions are welcome.

    Thank in advance

    trying to decode a woman mind....
    David O'Meara

    Joined: Mar 06, 2001
    Posts: 13459

    you've specified a directory, but not the file name. I'm not sure about how case sensitive log4J is, but you may want to try:

    'layout can be lowercase, but I'm not sure if the 'MaxFileSize' works with the Daily appender. Or maybe it does.

    I agree. Here's the link:
    subject: servlet loggin not working (log4j)
    It's not a secret anymore!