• 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

Log message is not diplaying in my project using struts framework

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
I have implemented log concept in my j2ee(Struts) project and using web sphere 5.1 server.
For example i am using the statement like

The code example i am using for displaying the log message is


My code compiled successfully and server started.

But while doing any changes in my application why i am not getting the log file where this message i should find for debugging purpose.
Should i do any setup or include any jar file for the needful.I have already included the log4j-1.2.9.jar.

Please guide me for the needful.

Thanks in advance.

Best Regards
Sumanta Panda
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to specify a log file path in log4j config file ?
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Sagar sir,
I did not get it.Means we need to write the Java log file where we will specify the log folder path name...Am i write sir?

I did not work on struts..But as i know if we write any thing in logger.info then it will save in a file called logs in your local machine.
Please sir rectify my statement if i am wrong.

Please advise me for the needful.

Thanks and Regards
Sumanta Panda
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sumanta panda wrote:Sorry Sagar sir,
No apologizes and no Sir, please.


And I never used log4j, but I think, like many other Apache product, we can have all the settings in config files. You need to read there User Gudes, FAQs or Google it.

Meanwhile, If its not mandatory to use log4j, you can use Struts Logging.
 
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
If you're using Log4J then you'll want either a log4j.properties (easier) or log4j.xml (a bit more versatile) configuration file on the classpath. See the Log4J documentation for configuration file content details.
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear David and Sagar,

Thanks a lot for your valuable Information.

Best Regards
Sumanta Panda
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic