<https://lh3.googleusercontent.com/-ehXdA_GuB2k/USaQ2vCG88I/AAAAAAAAABI/AKAm4uJcdo4/s1600/jenkins_log.png>
Hi Jesse,

I finally got around to making a simple test.  I generated the 
HelloWorldBuilder example described here, 
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial.

I added these two LOGGER lines to HelloWorldBuilder.java, commented with // 
NEW LINE.
------------------
...
 * @author Kohsuke Kawaguchi
 */
public class HelloWorldBuilder extends Builder {
    private static final Logger LOGGER = 
Logger.getLogger(HelloWorldBuilder.class.getName()); // NEW LINE
...
    @Override
    public boolean perform(AbstractBuild build, Launcher launcher, 
BuildListener listener) {
        LOGGER.warning("Hello, "+name+"!"); // NEW LINE
        // This is where you 'build' the project.
...
------------------

And I'm finding the same problem.  The warning is written to the console, 
but not the Jenkins Log.  Is this a defect?

Thanks in advance,
Scott


On Thursday, February 14, 2013 12:06:32 PM UTC-5, Scott Cowan wrote:
>
> Hmmm...  That is what I'm trying, and the my messages are getting logged 
> with the ConsoleLogger, but they're not appearing in the Jenkins log at 
> http://localhost:8080/log/all.  I'm launching with hpi:run.  I also 
> expected INFO level messages to be logged, not just "Anything over INFO".
>
> Got any other test ideas?  Thanks,
> Scott
>
>
>
> On Thursday, February 14, 2013 11:49:20 AM UTC-5, Jesse Glick wrote:
>>
>> On 02/14/2013 09:59 AM, Scott Cowan wrote: 
>> > I'd like to be able to log a stack trace at that point if the issue is 
>> severe. 
>>
>> private static final Logger LOGGER = 
>> Logger.getLogger(ThisClass.class.getName()); 
>> … 
>> } catch (Exception x) { 
>>      LOGGER.log(Level.WARNING, "optional info", x); 
>> } 
>>
>> Anything over INFO will be sent to the master log by default. You only 
>> need to configure custom loggers if you want to enable FINE/FINER/FINEST 
>> logging in some components. 
>>
>

-- 
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/groups/opt_out.


Reply via email to