GeeCON Prague 2014*
The moose likes Struts and the fly likes Log message is not diplaying in my project using struts framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Log message is not diplaying in my project using struts framework" Watch "Log message is not diplaying in my project using struts framework" New topic
Author

Log message is not diplaying in my project using struts framework

sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

Is it possible to specify a log file path in log4j config file ?


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jun 23, 2008
Posts: 224
Dear David and Sagar,

Thanks a lot for your valuable Information.

Best Regards
Sumanta Panda
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Log message is not diplaying in my project using struts framework