cancel
Showing results for 
Search instead for 
Did you mean: 

Write Java Mapping Exception in a new logging Location/Category

mayur_patel6
Participant
0 Kudos

I have a user defined function in my Message Mapping below is my code..This function just creates a logging Location and writes few messages with differnet severity to it. How can I get it to write any errors/exceptions which are generated by Runtime Java Mapping. Basically my input tag (which doesn't match <mannger>John Doe<Manager> throws *RuntimeException during appliction Java mapping * and by default it writes it to com.sap.aii.ib.server.mapping.execution.JavaMapping and I want it to write it to http://abc.com/xyz/FileToFile using my user defined function.

Hope it makes sense .. please feel free to ask for explanations...

Thanks for your help.


//create a location to store all logs from this particular Mapping...
Location myLoc = Location.getLocation("http://abc.com/xyz/FileToFile");

//to show everthing in my Log Viewer -> Location = http://abc.com/xyz/FileToFile
myLoc.setEffectiveSeverity(Severity.PATH);

myLoc.entering("method");
myLoc.warningT("TraceVar method: mayur myudflibrary - set warning");
myLoc.infoT("TraceVar method: mayur myudflibrary - set info");
myLoc.debugT("TraceVar method: mayur myudflibrary - set debug");
myLoc.pathT("TraceVar method: mayur myudflibrary - set path");
myLoc.errorT("TraceVar method: mayur myudflibrary- set error");
myLoc.exiting();

return inputTag.toUpperCase();

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Mayur,

You can see how to do this in these SAP notes below:

#1126753 - Creation of new trace level location in Visual admin

#1330975 - Creating custom trace locations in Visual Administrator

#761921 - Creating an XI Adapter Framework trace file

#747940 - Creating XI developer traces

I hope it's helpful.

Br,

Franklin

Answers (0)