Finding Code Generating Log Messages By Ids In WSIT WS-Policy Framework

Recently I got an e-mail containing following log message id: SEVERE: WSP001002:
Message was generated by our class in com.sun.xml.ws.policy.jaxws package.
In the first place I was wondering where in the code the message had been logged:


$ grep -n WSP001002 wsit/rt/src/\*\*/\*.java

It returned empty result, even if I was sure such an id was used in the code.

And the reason?

In policy code we used a convention that log messages starting with WSP<id number> were generated with message with keys starting with WSP_<id number>. We place an underscore between WSP and the number of the message.

And indeed, after trying:


$ grep -n WSP_001002 wsit/rt/src/\*\*/\*.java

I got


wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:278: LOGGER.severe("parseModel", LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:279: throw new PolicyException(LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:281: LOGGER.severe("parseModel", LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:282: throw new PolicyException(LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:284: LOGGER.severe("parseModel", LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:285: throw new PolicyException(LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jakub Podlesak

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today