That depends a bit on what "log-bridge" your slf4j logger is using, I
believe the standard in Jenkins is java.util.logging.

I don't know if this would work, but I would try something like this:

Logger l = Logger.getLogger("name.of.your.pojos.logger");
StreamHandler handler = new StreamHandler(listener.getLogger());
l.addHandler(handler);
try {
  pojo.execute()
} finally {
  l.removeHandler(handler)
}


/B

On Tue, Nov 4, 2014 at 12:17 PM, jwa <[email protected]> wrote:

> Good Morning All,
>
> I have written a Jenkins plugin which exposes a custom Builder, which may
> be added as a build step within jobs.
>
> The builder invokes some POJO code from another one of my projects. This
> project writes progress information out via slf4j. I have found that these
> log statements are being directed to the jenkins log file, which is cool,
> but it means that there is no visible progress statements placed in the
> console output for the job.
>
> Is there any advice on how best I can re-configure Jenkins' logger so it
> will take my logged statements via slf4j and direct them to both the
> console output as well as the Jenkins log file?
>
> Thanks,
>
> jwa.
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Robert Sandell
*Software Engineer*
*CloudBees Inc.*

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to