Skip to content
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

Closed
hmemcpy opened this issue Mar 9, 2015 · 4 comments
Closed

Allow command output as XML and/or JSON #159

hmemcpy opened this issue Mar 9, 2015 · 4 comments

Comments

@hmemcpy
Copy link
Contributor

hmemcpy commented Mar 9, 2015

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)

@ferventcoder
Copy link
Member

I'm pretty sure you can do this now by switching out the log4net logger. Should be pretty easy.

@ferventcoder
Copy link
Member

I did a quick spike on outputting xml (because it's built in). This is only like five messages from choco list -lo -r:

<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.

@delitescere
Copy link

👍

@pauby
Copy link
Member

pauby commented Dec 19, 2023

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.

@pauby pauby removed this from the 1.x milestone Dec 19, 2023
@pauby pauby closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants