Is there a way for the Progress Rest Adapter to log all the received REST calls and how it attempted to map them? Or is some config I can add to Tomcat?
Paul
- Add logging levels in the respective webapp such that more information is shown. The log file will give the information about the values that REST adapter received as part of the request (JSON) for each of the input parameter of the ABL file. This will allow us to validate if proper values are sent to the Appserver
o In ‘runtime.props’ file located at WEB-INF directory modify the ‘logginglevel’ value to 4 (by default it will be 2)
ü WEB-INF directory (WEB-INF/adapters/runtime.props)
- To verify whether the business logic execution (say filter value is reaching properly) we can check in ‘restbroker1.broker.log’ and ‘restbroker1.server.log’ files located in the working directory.
- In the web application's logging configuration file (/webapps/<rest-service-name>/WEB-INF/classes/log4j.properties) change the logging level for this line logging level from ERROR to DEBUG:
o log4j.logger.com.progress.rest.security=ERROR, xxxxxxxx
- Restart the web server for the change in logging level to take effect. The logging will appear in the REST service's log file located under /webapps/<rest-service-name>/WEB-INF/adapters/logs
Is there a way for the Progress Rest Adapter to log all the received REST calls and how it attempted to map them? Or is some config I can add to Tomcat?
Paul
Flag this post as spam/abuse.
Thanks Anil. I also found that just having the Chrome Developer Console open shows me all the calls in real time.
Anil,
For web and security related logs, will it write to catalina.out?
Note that setenv.bat and startup.db (for Tomcat) do not define CATALINA_OUT so I had to add it manually. It's ok in the catalina.sh.
Hi Paul,
For REST Application and Security related logs I would suggest looking at the REST Application logs which will reside in $CATALINA_HOME/webapps/<RESTApplication>/WEB-INF/adapters/logs/<RESTApplication>.log
As mentioned above by Anil, for Security you need to do the below setting in log4j.properties
log4j.logger.com.progress.rest.security=DEBUG, <RESTApplication>
For 11.4, we have added the ability of looking at the real time Request and Response objects which leverages Tomcat's feature "http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Request_Dumper_Filter " for purely debugging purpose. You might want to think about it if you are using OpenEdge 11.4
Hi Paul,
What type of problem are you trying to seeing and in what type of server? There are differences between the servers/tomcat we distribute in the OE studio product and a generic Tomcat server you download and install yourself. Knowing the type of problem you are having, and in what type of server, will help determining whether logging can help (and what type of log created - where) or whether you have to look at another methods.
Mike J.
Good morning Mike,
Actually surprisingly few problems! This REST stuff has worked exactly as expected. Our first issue was from the UI (ExtJS) side which was not passing the unique id correctly. The Chrome Developer Tool showed us the URL called and the missing key. Turned out we got burned by case sensitivity in the variable name (a chair-keyboard interface error). Second was in the appSecurity file: we mixed the Progress REST project with the EXtJS project in the same webapps directory so appSecurity was blocking access to the ext/ sub directory.
As you can see it was nothing major. But this opened up the need to know how/where to debug.
Thanks,
Hi All,
Can i change this path-/webapps/<rest-service-name>/WEB-INF/adapters/logs to my own defined path?
I have changed this path, initial file is created, But it is not updating whenever I access the rest service.
Thanks,
Sivarami Reddy M
[mention:f95836da206541139a3e4be6dab016fa:e9ed411860ed4f2ba0265705b8793d05] It's not clear whether you're using PASOE or the Classic AppServer + REST adapter. In PASOE , all logs are in the instance's logs/ directory.
This thread predates PASOE's release by some 6 months and so the advice in it should only be used for the REST adapter + Classic AppServer.
Thanks Peter for your quick reply.
I am using OE 11.5 with Classic AppServer + REST adapter, I have done the chnages like below .
From this path - log4j.appender.@webapp@.File=${catalina.base}/webapps/@webapp@/WEB-INF/adapters/logs/@webapp@.log to
log4j.appender.@webapp@.File=D:/Progress/Tomcat 7.0/logs/@webapp@.log. File has been created successfully, but file updating whenever we have the restservice call.
Regards,
Sivarami Reddy M
but file is not updating whenever we have the restservice call.