• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

1.log4j

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am migrating my application from weblogic to websphere. In my application the code uses t3 services to generate logs. I have to change that code to generate logs using log4j.I have to write code for rolling logs up to 7 days. can any one help me out how I can do this and the location of the jar and property files required for this.

Thanks.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just make sure that both a log4j.xml file and the log4j.jar file are both in the classpath. I generally define a shared library with log4j and other universally used jar files and then define a classloader for the server that points to the shared library.

Regarding rolling files, here's a snippet from a log4j.xml file that defines a rolling file that gets to a maximum size of 5M and stores up to 100 files:

[ July 02, 2008: Message edited by: Merrill Higginson ]
 
Uh oh, we're definitely being carded. Here, show him this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!