How to Enable vCO 5.1.x to log API requests

When working with new integrations that utilize the vCenter Orchestrator (vCO) REST API you may want additional logging on the vCO side to see what is happening. I came across this need on a recent project. By default, vCO is logging workflow and webview activities but not API calls. This short article walks you through the steps necessary to enable such logging.

The following steps will enable additional logging on your vCO server. With these changes, be sure that you manage the log files that get generated…

  • On your vCO server, go to the following folder: /app-server/server/vmo/deploy/jboss-deploy-tomcat/jbossweb-tomcat55.sar
  • Edit the “server.xml” file
  • Uncomment this section:
1
2
3
4
5
6
<!--
  &lt;Valve className="org.apache.catalina.valves.AccessLogValve"
              prefix="localhost_access_log." suffix=".log"
              pattern="common" directory="${jboss.server.home.dir}/log"
              resolveHosts="false" /&gt;
-->
  • Uncommenting that line will result in the creation of a “localhost_access_log..log file. This file will log header details about each request
  • Since you likely want more detail than just headers, uncomment the following line too: <Valve className="org.apache.catalina.valves.RequestDumperValve" />
  • Uncommenting that line will result in API related call details showing up in the server.log file Now save the file and restart the vCO Server service

The log files for vCO 5.1.x are found in /app-server/server/vmo/log

Reference:

How to enable jboss to log http payloads