File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes how can i print console log into in log file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "how can i print console log into in log file" Watch "how can i print console log into in log file" New topic
Author

how can i print console log into in log file

Naveen Madarapu
Ranch Hand

Joined: May 24, 2011
Posts: 62

can any one know about using the log4j working with properties file along with it's spring frame work.?
my problem is to print the console log messages will be write in the some log file how can i do that one
i know how to write log4j.properties file and adding the .jar file except these can i do anything else?


OCPJP
Sam Mercs
Ranch Hand

Joined: Feb 08, 2009
Posts: 539

Naveen Madarapu wrote:i know how to write log4j.properties file and adding the .jar file except these can i do anything else?


Not sure what you mean by anything else? You can problematically set the log4j properties. (Not sure if you could create an appender though!)

Why isn't it good enough to update the log4j.properties file? That's the usual way to do it!


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Chandraprakash Sarathe
Greenhorn

Joined: Jan 21, 2012
Posts: 16
Use FileAppender instead of Console Appender, this is what Log4J is meant to provide logging in log files.


Chandraprakash Sarathe
http://javaved.blogspot.com
Naveen Madarapu
Ranch Hand

Joined: May 24, 2011
Posts: 62

i want to know when ever i run the spring application commens logging messages can i write into a file by using the log4j.........
 
 
subject: how can i print console log into in log file
 
Threads others viewed
Getting all data in the consol and dumping it into a text file
Windows Xp LogIN and LogOut detection
Windows Xp LogIN and LogOut detection
Issue in using the DatabaseServerLoginModule for encrypting the password using MD5
Windows Xp LogIN and LogOut detection
developer file tools