Does AuditListener have a limit?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Does AuditListener have a limit?

ebruner
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I have implemented the AuditListener to customize the output of Checkstyle.  However, when I run a scan on lots of files with lots of errors (ex. 100+ errors), then Checkstyle dumps the errors at a place in the output I didn't expect.  It seems to be happening in addError().  I have overridden this method to contain an error counter.  I don't know where these errors are getting printed from.  Is there any logic in CS that will "dump" error messages when they reach a certain number?

thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does AuditListener have a limit?

ebruner
This post was updated on .
Can some one please help me with this?  I think I've narrowed my problem to Checkstyle.  My custom checks log their errors using Check.log().  I have additionally implemented a custom AuditListener. My problem is associated with Checker.fireErrors().  This method calls the logError() of my auditListener, so I can deal with the error.  However, after ~70 errors fireErrors(), fireErrors() dumps the errors to stdout.  This is a problem because it messes up my output report.
Is there anyway to stop this from happening?  It appears to me that the job of fireErrors() is to notify all the auditListeners of errors...there must be a standard auditListener that Checkstyle always is using.

thanks for any feedback.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does AuditListener have a limit?

Wippermann, Peter, Vodafone DE
Hi,

Did you lookup the behaviour you described in the source code?
That should be provable somehow, shouldn't it? Anyway this sounds worth a bug report.

Best regards,
Peter Wippermann


 

 
-----Urspr√ľngliche Nachricht-----
Von: ebruner [mailto:[hidden email]]
Gesendet: Donnerstag, 5. Juli 2012 17:30
An: [hidden email]
Betreff: Re: [Checkstyle-user] Does AuditListener have a limit?

Can some one please help me with this?  I think I've narrowed my problem to Checkstyle.  My custom checks log their errors using Check.log().  I have additionally implemented a custom AuditListener. My problem is associated with Checker.fireErrors().  This method calls the logError() of my auditListener, so I can deal with the error.  However, after ~70 errors fireErrors(), fireErrors() dumps the errors to stdout.  This is a problem because it messes up my output report.
Is there anyway to stop this from happening.  It appears to me that the job of fireErrors() is to notify all the auditListeners of errors...there must be a standard auditListener that Checkstyle always is using.

thanks for any feedback.

--
View this message in context: http://checkstyle.2069334.n4.nabble.com/Does-AuditListener-have-a-limit-tp4654086p4654089.html
Sent from the CheckStyle - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does AuditListener have a limit?

ebruner
Yes, it is as I suspected.  On line 511 of Checker.java the mListeners object contains a DefaultLogger object in addition to my custom Listener.  I'm guessing at this point that the DefaultLogger is always added and that it is dumping the errors.  If I add a custom AuditListener, shouldn't it be the only Listener active?
Is there anyway around this issue?  How do I submit a bug issue?
I can't be the only one who has encountered this issue.  I only see the issue when running on a large number of files (500+) when a large number of errors are encountered.
No problems for small data sets.
thanks.
ed
Loading...