Re: slf4j & TaskListener.getLogger intercept

2017-12-19 Thread Shaun Thompson
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  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  
 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
>>>  
>>> 
>>> .
>>>
>>> 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.


Re: slf4j & TaskListener.getLogger intercept

2017-12-18 Thread Stephen Connolly
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  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 
>> 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-dev+unsubscr...@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
> 
> .
>
> 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/CA%2BnPnMyYHjFTetotjKngHO-hzn0PQNt-%3DmEouk4mK0KKh7RmFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: slf4j & TaskListener.getLogger intercept

2017-12-18 Thread Shaun Thompson
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  > 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-dev+unsubscr...@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.
For more options, visit https://groups.google.com/d/optout.


Re: slf4j & TaskListener.getLogger intercept

2017-12-18 Thread Jesse Glick
On Sat, Dec 16, 2017 at 2:18 PM, Shaun Thompson  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-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr18ZSBxgO5gmmbH7M0nvqkkg%2B%2BJxitCjiAc4Nfcf4b17A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


slf4j & TaskListener.getLogger intercept

2017-12-16 Thread Shaun Thompson
I'm looking for ideas on a clean way to intercept logging in a Pipeline 
coming from the TaskListener.PrintStream getLogger() for other API's that 
are using slf4j.

Thanks

-- 
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/8c4a26a4-ba3d-459a-9207-cdd076bf95c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.