I guess the other approach is to have the plugin append to the Jenkins 
system log.  The plugin is using slf4j with jul-to-slf4j with a log4j2.xml 
configuration that goes to SYSTEM_OUT.  Before I start trying to find the 
write logging settings, is this possible?

Thanks

On Tuesday, December 19, 2017 at 10:02:31 AM UTC-6, Shaun Thompson wrote:
>
> The way my plugin is setup is that I have a core API that has zero 
> knowledge of Jenkins.   This allows the code to be used in a standalone cmd 
> line or war type application.  Jenkins plugin just orchestrates the code.  
> I think I'll provide a thin wrapper around the TaskListener.PrintStream 
> object for now in order to send valuable build information to the Pipeline 
> build logs.
>
> Thanks
>
> On Monday, December 18, 2017 at 3:04:16 PM UTC-6, Stephen Connolly wrote:
>>
>> Running build related things in the Jenkins JVM is kind of an 
>> anti-pattern IMHO. Better to fork a JVM that you have complete control over 
>> the classloader, in which case the logging goes to STDOUT and you just pipe 
>> that to the build log
>>
>> On 18 December 2017 at 20:16, Shaun Thompson <sth...@gmail.com> wrote:
>>
>>> I'm looking to output external logging, API's that use slf4j, to the 
>>> build logs.  
>>>
>>> On Monday, December 18, 2017 at 8:16:18 AM UTC-6, Jesse Glick wrote:
>>>>
>>>> On Sat, Dec 16, 2017 at 2:18 PM, Shaun Thompson <sth...@gmail.com> 
>>>> wrote: 
>>>> > intercept logging in a Pipeline 
>>>> > coming from the TaskListener.PrintStream getLogger() for other API's 
>>>> that 
>>>> > are using slf4j. 
>>>>
>>>> Not sure what you are talking about. Build logs (`TaskListener`) and 
>>>> the system log (`java.util.logging`) are unrelated. 
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-de...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-dev/1a003078-f2a5-4e6d-b42a-782be39da94e%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-dev/1a003078-f2a5-4e6d-b42a-782be39da94e%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 Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/27650f95-17bf-4ace-ac62-4e417d1bc270%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to