VMware {code} Community
ZackZhang
Contributor
Contributor

Log level setting in vCO configuration interface has no effect on vCO plugin?

Hi,

     I'm developing a vCO plugin in which I log information on the DEBUG level. Then I went to vCO configuration interface and changed the log level to DEBUG expecting that my log would be present in the log file. However it didn't work.

     Then I came to sense that the log level setting in vCO configuration interface might not have effect on the log for vCO plugin. Then I googled and found this article http://www.vcoteam.info/learn-vco/how-to-handle-vcenter-orchestrator-logs.html which showed me how to change the log level for vCO plugin (by the example of vColud Director plugin) by manually editing the log configuration file located in install_directory\app- server\server\vmo\conf. I followed the steps and it worked for me.

     What I want to know is, if there's any way to change the log level for the vCO plugin that doesn't involve manually editing the log configuration file. I don't want to ask my customers (people who will use my vCO plugin) to manually edit the config file when they reach me for troubleshooting.

     Thanks in advance!

0 Kudos
3 Replies
igorstoyanov
VMware Employee
VMware Employee

I am afraid there is no other way but somebody could have some other ideas.

I am not sure if this will going to work but you can try to change the logging levels for your classes programmatically. A few links with examples of that:

http://robertmaldon.blogspot.com/2007/09/programmatically-configuring-log4j-and.html

http://www.mooreds.com/wordpress/archives/238

If this works, then you can expose the java method via scripting, which could be wrapped with a workflow. The you can ask your customers just to run a workflow that change only the debug level for your classes.

Visit http://blogs.vmware.com/orchestrator for the latest in Cloud Orchestration.
0 Kudos
ZackZhang
Contributor
Contributor

Thanks for the answer, Igor, exposing the log setting through a workflow should be viable for me, I will look into its possibility.

0 Kudos
ZackZhang
Contributor
Contributor

Hi Igor,

     I followed the article How to handle vCenter Orchestrator logs? to manually change the log level configured in log4j.xml, however, this doesn't seem to work for the configuration part of my plugin (like most of the other vco plugins, I have a configuration web app for my plugin). Actually, even for the INFO level logs I logged for my configuration webapp, I couldn't find it anywhere in Server.log.

     I checked VMware's own SSH plugin, and I couldn't find its configuration log, either. That lead me to wonder if configuration log for vco plugins is logged in another place rather than Server.log?

     Thanks in advance!

0 Kudos