-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow command output as XML and/or JSON #159
Comments
I'm pretty sure you can do this now by switching out the log4net logger. Should be pretty easy. |
I did a quick spike on outputting xml (because it's built in). This is only like five messages from <event logger="chocolatey.infrastructure.app.services.NugetService" timestamp="2015-11-04T13:59:37.7764193-06:00" level="INFO" thread="10" domain="choco.exe" username="rob">
<message>xunit.assert|2.0.0</message>
<properties>
<data name="log4net:UserName" value="rob" />
<data name="log4net:Identity" value="" />
<data name="log4net:HostName" value="test"/>
</properties>
</event>
<event logger="chocolatey.infrastructure.app.services.NugetService" timestamp="2015-11-04T13:59:37.7920227-06:00" level="INFO" thread="10" domain="choco.exe" username="rob">
<message>xunit.core|2.0.0</message>
<properties>
<data name="log4net:UserName" value="rob" />
<data name="log4net:Identity" value="" />
<data name="log4net:HostName" value="test" />
</properties>
</event>
<event logger="chocolatey.infrastructure.app.services.NugetService" timestamp="2015-11-04T13:59:37.7920227-06:00" level="INFO" thread="10" domain="choco.exe" username="rob">
<message>xunit.extensibility.core|2.0.0</message>
<properties>
<data name="log4net:UserName" value="rob" />
<data name="log4net:Identity" value="" />
<data name="log4net:HostName" value="test" />
</properties>
</event>
<event logger="chocolatey.infrastructure.app.services.NugetService" timestamp="2015-11-04T13:59:37.7920227-06:00" level="INFO" thread="10" domain="choco.exe" username="rob">
<message>xunit.runner.console|2.0.0</message>
<properties>
<data name="log4net:UserName" value="rob" />
<data name="log4net:Identity" value="" />
<data name="log4net:HostName" value="test" />
</properties>
</event>
<event logger="chocolatey" timestamp="2015-11-04T13:59:37.7920227-06:00" level="INFO" thread="10" domain="choco.exe" username="rob">
<message>Exiting with 0</message>
<properties>
<data name="log4net:UserName" value="rob" />
<data name="log4net:Identity" value="" />
<data name="log4net:HostName" value="test" />
</properties>
</event> Does this look like consuming will be easier? I'm gather not really as a start, but perhaps I'm confused. |
👍 |
There doesn't look like there is anything more to do in this issue, so I'm going to go ahead and close it. We can always reopen it again later, if necessary. |
This will make consuming the output from choco easier from, say, powershell, without using the DLLs directly.
Please consider adding this support (heh, I think SVN does this for all its commands)
The text was updated successfully, but these errors were encountered: