08-11-2017 05:01 PM
I have the following entry in catalina.out
Can I know which webscript is called by looking at this entry?
08-12-2017 06:33 AM
You cannot determine the calling web script from a log entry like this alone, unless the code that does the logging - or the logging framework itself - does some stack analysis to determine the caller / context. Since Alfresco does not provide the name / ID of the currently executing web script in some thread-local data structure, you would have to do some invasive thread stack + variable state analysis, which might even require use of JDK internal APIs...
A simple albeit "dumb"-fire approach is for the code that logs to create a new exception and use that exception object to get to the current stack trace. But that won't give you the name / path of the JavaScript file if you are being called from a JavaScript-backed web script (which in your case is the case since we are talking about a script extension).
Long answer short: You could determine the calling web script, but the cost / complexity is too great...
Explore our Alfresco products with the links below. Use labels to filter content by product module.