I found an extremely useful blog for beginners on this topic
here is the link ,have a look!!
Struts1 vs Struts2
Here r some basics of Log4j , if u r newbie like me :-) then u can view- Log4j has three main components: categories, appenders and layouts.
- You instantiate a category and then call its various logging methods to send your message strings to log(s).
- A category is configured to log to one or more destinations or targets. These logging destinations are called "appenders" in Log4j, probably because these classes by default "append" your message string to the end of the log. Log4j can send your log messages to the console, a text file, an html file, an xml file, a socket or even to the Windows NT Event Log, all with one logging call. It can even send your log message as an email (desirable for fatal errors, for example).
- Some appender classes are
ConsoleAppender, FileAppender, SMTPAppender, SocketAppender, NTEventLogAppender, SyslogAppender, JMSAppender, AsyncAppender and NullAppender. - An appender uses a layout to format your message before actually writing it to the log. For example, the
HTMLLayout will format all your messages into a nice HTML table. - In addition to logging the message that you send, Log4j can also log the date, time, message priority (DEBUG, WARN, FATAL etc.), Java class name, source code line number, method name, Java thread name and much more. What to log is specified in the layout which an appender s configured with.
Standards are always out of date. That's what makes them standards. (Alan Bennett)
If debugging is the process of removing bugs, then programming must be the process of putting them in.