Re: plugin ConsoleLogFilter class not loaded suddenly

2014-08-07 Thread sdetweil
this was a user error. the filter class did load correctly, but the log 
filter was incorrect. 
the original problem was one line of code missing which initiated the data 
capture. 
no idea what caused the lost code problem, but I must have done it as I am 
the only developer


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


plugin ConsoleLogFilter class not loaded suddenly

2014-08-05 Thread sdetweil
I am extending one of the existing plugins.  back in May I added a 
ConsoleLogFilter class and it worked great. no issues.  up thru Jenkins 
1.572.

the developer has released new source, so I have ported my changes over..  
rebuilt the hpi and reloaded from my local system as always. 
the installed plugins view shows my version signature with the proper 
timestamp. 

but my logfilter class does not get invoked. I am building here on the 
master machine. I usd 7zip to look inside the hpi package, and the 
proper classes are present.

I have LOGGER.fine(.) clauses in the filter code to show it operating..
no log entries are captured. (the logger name did NT start with "jenkins" 
(nor back in may either when it last worked).. but even if I add that, 
still nothing. 

its almost like the public version is downloaded over mine. (the last good 
build is at 83, I am now at build 126. 
I have rebooted the local system (virtual machine)
stopped an restarted jenkins..

the failure stated on August 1. up til then it was ok. (for 10 days 
before)..
the only thing of note is that I had a compile error on that day and got a 
java.lang.NoSuchMethodException:  during execution of the job using that 
plugin.

jenkins is running under apache tomcat6, on ubuntu linux. 12.04 64bit. 

I reloaded my may version of the hpi, and it works properly. 
so, what did I do, and how do I fix it or debug it? 

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


ConsoleLogFilter data

2014-04-21 Thread sdetweil
I need to extend an existing plugin to capture all the job console log. 

I created a ConsoleLogFilter and it works great, 
everything appears in the job log as expected, matching before my
consolefilter was installed. 

except one issue. 

I am saving the output into a ByteArrayOutputStream, 1 byte at a time
the data received for the 'log started by' and 'Build Successful' lines have
a bunch of garbage
in the message
'Started by user
 
[8mha:lh+LCP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAzOEgYu/dLi1CL9vNKcHACFIKlWvw==
 [0manonymous'

instead of 'Started by user anonymous'
and 

'[8mha:YB+LCP9b85aBtbiIQSGjNKU4P0+vJLE4u1gvPjGvRM8xr8S/tCQ5PzfVL78ktUuDM0uMry+HiYGhoohBCqo8OT+vOD8nVc8ZQoMUMkAAI0hhAQAUXUdTXg==
 [0mBUILD
SUCCESSFUL'
instead of 'BUILD SUCCESSFUL'

I added a logger as prt of the filter and see these chars come thru from the
source
Apr 16, 2014 10:49:41 AM FINE my class
char='a'
Apr 16, 2014 10:49:41 AM FINE my class
char=':'
Apr 16, 2014 10:49:41 AM FINE my class
char='A'
Apr 16, 2014 10:49:41 AM FINE my class
char='A'
Apr 16, 2014 10:49:41 AM FINE my class
char='A'
Apr 16, 2014 10:49:41 AM FINE my class
char='A'
Apr 16, 2014 10:49:41 AM FINE my class
char='l'
Apr 16, 2014 10:49:41 AM FINE my class
char='h'
Apr 16, 2014 10:49:41 AM FINE my class
char='+'
Apr 16, 2014 10:49:41 AM FINE my class
char='L'

my subclass of the outputstream to the decorator
// our interceptor stream
private class interceptorOutputStream extends OutputStream 
{
OutputStream p; 
// save the original
public interceptorOutputStream(OutputStream arg1)
{
 p = arg1;
 }

// only override the one method, gets all the data
@Override
public void write(int b) throws IOException
{
// pass it on to the build log
p.write(b);

// write to our capture buffer
fbuildStream.write(b); 

// for debugging only
// if we haven't seen the end of the first line
 if(firstoutput)
 {
// log the character
LOGGER.fine("char='"+((char)b)+"'\n"); 
< log lines above

// if end of line
if(b == '\n')
{
// say we hit first end of 
line, first message written 
LOGGER.fine("\nfirst end of 
line found\n");
// ingore all the rest
firstoutput=false;
}
}
}
}

the two lines affected both have markup applied 
Started by user  anonymous   
and 
BUILD SUCCESSFUL


what did I do wrong?

thanks



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/ConsoleLogFilter-data-tp4698933.html
Sent from the Jenkins dev mailing list archive at Nabble.com.

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


Plugin design overview

2013-04-05 Thread sdetweil
I am starting on my first plugin.  but I can't quite figure out the parts..

how do tell the global configuration code (shows up in Jenkins Configure 
System)
from the Job code  stuff that appears independent of Job step (or post job 
step).

I see the jelly parts, I just can't tie that to code yet.. 

I've loaded the source for other plugins for learning, but this part is 
still escaping me. 
the extending Architecture words don't add anything.

I don't see the inheritance tree. and why would I choose one approach vs 
another. 
I do get that a plugin can provide additional extension points for other 
downstream plugins to leverage so a single inheritance chart can't show 
everything

I see some plugins subclass Builder, some see to go right to a lower 
subclass (Notifier, publisher, recorder,...)

then I see things like FTPPublisher, can 'add' a new entry in its post 
build step. 
I see the code, and I see the delete button on the config.jelly file, but I 
don't see the Add button. 
so it must have been a documented side effect of something.. but I can't 
find that. 
I don't find any good doc/javadoc on the Jenkins use of Jelly.

because there are so many other plugins, a lot of folks have gone thru this 
startup process.
what am I missing? 

I can maven build the sample, and any plugin I download, and can run it 
both standalone and thru my running jenkins. 
I have a whole build tree of jobs that run and work fine (on agents on 
different operating systems all virtual machines).. but I want another 
function.. so why not learn how to extend it?!
(and I use eclipse and m2e). 

thanks for any guidance

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.