Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Could you please give me the Log 4j code for this requirement

Posted on 2011-03-03
4
311 Views
Last Modified: 2012-08-13
use logger at the beginning and end of methods. So that we will be able to identify the error. In error log specify method name, table/component name
0
Comment
Question by:stmani2005
  • 3
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 35029976
You'd probably be better off putting in the method name manually to avoid the expense of getting the call stack
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35030045
Otherwise, see the 'M' parameter here: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html , which will automatically give you the method name
0
 
LVL 92

Expert Comment

by:objects
ID: 35031285
you cannot achieve that with log4j sorry.
you instead need something like aop
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35180110
:)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ForLoop Example 3 52
nextBoolean(double p) for Random class 3 41
servlet example 17 51
ejb message driven bean mdb creation steps 2 16
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question