• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

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

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
Manikandan Thiagarajan
Asked:
Manikandan Thiagarajan
  • 3
1 Solution
 
CEHJCommented:
You'd probably be better off putting in the method name manually to avoid the expense of getting the call stack
0
 
CEHJCommented:
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
 
objectsCommented:
you cannot achieve that with log4j sorry.
you instead need something like aop
0
 
CEHJCommented:
:)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now