File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log message is not diplaying in my project using struts framework

 
sumanta panda
Ranch Hand
Posts: 224
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Sagar Rohankar
Ranch Hand
Posts: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to specify a log file path in log4j config file ?
 
sumanta panda
Ranch Hand
Posts: 224
  • 0
  • Mark post as helpful
  • send pies
  • 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: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear David and Sagar,

Thanks a lot for your valuable Information.

Best Regards
Sumanta Panda
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic