Solved

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

Posted on 2011-03-03
4
321 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
[X]
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
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fast way to search item into Java Array (Rhino compatible) 2 47
jsp error 6 70
Java Eclipse Loop 3 47
netbeans can not run self signed app 8 37
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

732 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