Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic