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

Posted on 2011-03-03
Medium Priority
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
  • 3
LVL 86

Accepted Solution

CEHJ earned 2000 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
LVL 86

Expert Comment

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
LVL 92

Expert Comment

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

Expert Comment

ID: 35180110

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

600 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