• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

log4j in WebSphere5.1

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all

Does anybody know , how to configure log4j in websphere 5.1?? First, I developed my application for weblogic 7.1. then i ported to websphere 5.1. log4j was working fine in weblogic. But, in websphere everything is fine except log4j. Do i need to add any special entries in server specific xml files???

plz help me......

Sam
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the IBM/Websphere Forum...
 
author & internet detective
Posts: 41250
849
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sam,
What error are you getting?
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I set up log4j in WebSphere just like anywhere else, I'd imagine. Create a servlet with init method:

public void init()
{
String prefix = getServletContext().getRealPath("/");
String file = getInitParameter("log4j_conf");
if (file != null)
{
PropertyConfigurator.configure(prefix + file);
}

}

and then in the web.xml file make sure load-on-startup is set to 1 and the log4j_conf init param value is set to the path to the log4j_conf.properties file. No worries...
 
Sam De Albin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i doesnt get any error!! in the log4j.properties file , I mentioned the file name of the logger. But, that file is not at all there when I run the pgm. Should I create a blank file before starting the Application???

Sam.
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic