wood burning stoves 2.0*
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
Author

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
    Rancher

    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.

    Dave
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: servlet loggin not working (log4j)
     
    Similar Threads
    Log4j - Compress Log Files
    Frontman 2 FileNotFoundException ?
    how to consume a webservice using axis2
    Log4j and WSAD 5.0
    Logging with WSS4j