?
Solved

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

Posted on 2011-03-03
4
Medium Priority
?
326 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 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
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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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