• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Unable to control logging levels in Struts2 using log4j.properties

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, here's my dilema,
I have an Struts2 application running on a GlassFish server. Everything runs just fine, but the problem that I have is configuring the logging levels using log4j. Every time I submit a request, my console gets a a ton of messages and the server.log file is getting rotated frequently because the logs get full rapidily. I've tried to decrease the log levels for some of the packages in struts 2 but nothing seems to work

Here's my log4j.properties


Does anyone know what I can do to stop all these messages from appearing in my logs. I just want error messages not bunch of debugs and info, warnings.
I've tried a lot of things but now I don't know what to do

Does the fact that I have both commons-logging.jar and lo4j.jar in my lib have anything to do with this? As far as I know Struts2 uses commons-logging but I would think that they can both work independently???
Please help

Here's a snippet from my console
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It might be a GlassFish-specific issue, since I'm controlling logging just fine on three different app servers using a log4j.properties file.

Perhaps it's picking up a server-wide config?
 
Roberto Hernandez
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David, I thought about that too but I'm not really sure I've messed around with GlassFish settings. I'll investigate even further and will post again once I find the solution
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic