I suppose that the ANSI color plugin uses ANSI codes to detect colors.

I think that this is just unsupported on windows, since the windows console
(cmd.exe -- invoked by Jenkins) is not a terminal emulator.

you could try using ansicon, according to stackoverflow. But this looks
like a solution to set the colors using ansi codes, rather than a solution
to emit ansi codes when the color is set.

Good luck, let us know if you find a solution!
Le 24 mars 2015 5:10 PM, "Brent Scriver" <bscri...@phxlabs.ca> a écrit :

>
> I did some further digging as we had a C++ app behaving the same way:
> emitting color in a standard console but the color doesn't appear in
> Jenkins.
>
> It turns out the C++ app (and presumably the C# one) is using the low
> level console APIs such as WriteConsole:
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms687401%28v=vs.85%29.aspx.
> This isn't being captured by Jenkins. Not sure if there is a simple
> solution.
>
> Brent
>
> On Tuesday, March 3, 2015 at 3:55:16 AM UTC-5, Baptiste Mathus wrote:
>>
>> Right, read too quickly.
>>
>> Just took the opportunity to try and crawl the now OSS'es .Net code:
>> https://github.com/dotnet/corefx/tree/master/src/System.Console/src/System
>> (disclaimer: I don't know DotNet at all)
>> Wild guess: seems like that ConsolePal class is wildly different for
>> Windows & Unix. So I should think that code is not issuing ANSI codes? Or
>> maybe there's a way to force output to be "Unix"?
>>
>> Maybe some DotNet savvy guy could have a look and do a better job
>> guessing what's wrong here?
>>
>> My 2 cents
>> HTH
>>
>> 2015-03-02 18:20 GMT+01:00 Slide <slide...@gmail.com>:
>>
>>> He mentioned in his email that he has the ANSI color plugin installed.
>>>
>>> On Mon, Mar 2, 2015 at 10:15 AM Baptiste Mathus <m...@batmat.net> wrote:
>>>
>>>> Try the ANSI color plugin? (Supposing .Net is emitting standard codes).
>>>> Le 2 mars 2015 17:25, "Brent Scriver" <bscr...@phxlabs.ca> a écrit :
>>>>
>>>>
>>>>> I have the ansi color plugin installed and verified it works, however
>>>>> .NET or C++ applications setting console colors and emitting text does not
>>>>> appear colored in the log. Is there a configuration setting to enable it?
>>>>>
>>>>> The .net code is pretty simple:
>>>>>         static void Main(string[] args)
>>>>>         {
>>>>>             Console.ForegroundColor = ConsoleColor.DarkRed;
>>>>>             Console.BackgroundColor = ConsoleColor.DarkCyan;
>>>>>             Console.WriteLine("This should be dark red on a dark cyan
>>>>> background.");
>>>>>             Console.ForegroundColor = ConsoleColor.Red;
>>>>>             Console.BackgroundColor = ConsoleColor.Cyan;
>>>>>             Console.WriteLine("This should be red on a cyan
>>>>> background.");
>>>>>         }
>>>>>
>>>>> Producing the output:
>>>>>
>>>>>
>>>>> <https://lh6.googleusercontent.com/-0A68v4gM8eA/VPSOZdakiEI/AAAAAAAAABs/NEm3QwrE_ew/s1600/DotNetColorOutputTest.png>
>>>>>
>>>>> I also tested a batch file with the text:
>>>>>
>>>>>
>>>>> <https://lh5.googleusercontent.com/-kLAB5HpJ030/VPSOlrTOGKI/AAAAAAAAAB0/RYIX-frfKfk/s1600/AnsiColorTest%2BBatch%2BFile.png>
>>>>>
>>>>> This resulted in the Jenkins output:
>>>>>
>>>>>
>>>>> <https://lh4.googleusercontent.com/-n1oRJhrsQB0/VPSOsmVFF_I/AAAAAAAAAB8/RTqoIiMnH_w/s1600/Jenkins%2BOutput.png>
>>>>>
>>>>> Recommendations?
>>>>>
>>>>> Thank you for your time!
>>>>>
>>>>> Brent
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to jenkinsci-use...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/2b5baa64-ae89-494a-9e1e-869a0d566f07%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/2b5baa64-ae89-494a-9e1e-869a0d566f07%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Jenkins Users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to jenkinsci-use...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6mvgiWZV43ufK4cvg17_C4NkkrjD%2B8e%2B6aPdnX-gEF7w%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6mvgiWZV43ufK4cvg17_C4NkkrjD%2B8e%2B6aPdnX-gEF7w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfOKjjOmBzgKBBmWw7hXfgRS_K4bAN9i%3DP%2Btnn3wiH-tg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVfOKjjOmBzgKBBmWw7hXfgRS_K4bAN9i%3DP%2Btnn3wiH-tg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> Baptiste <Batmat> MATHUS - http://batmat.net
>>> Sauvez un arbre,
>>> Mangez un castor !
>>> nbsp;!
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/2add3338-08b5-42dd-9756-73cf65ba86ef%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/2add3338-08b5-42dd-9756-73cf65ba86ef%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPc4eF-h4ugRp%2Bppjx9b1fd_jTHDG--Rc-62wVDmdCAJ%3Ds07fg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to