• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

servlet loggin not working (log4j)

 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

     
    Rancher
    Posts: 13459
    Android Eclipse IDE Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    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
     
    And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
    Smokeless wood heat with a rocket mass heater
    https://woodheat.net
    reply
      Bookmark Topic Watch Topic
    • New Topic