How to exclude Logger from PIT coverage. Is it a good practice to exclude logger or we should cover that also.
By default PIT excludes calls to classes in the following root packages (and their children) from mutation
java.util.logging
org.apache.log4j
org.slf4j
org.apache.commons.logging
If you using a logger not in one of these packages you can exclude it using the avoidCallsTo configuration parameter.
Henry
Marcin Zajączkowski
unread,
Jun 21, 2015, 3:33:22 PM6/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pitu...@googlegroups.com
On 2015-06-21 19:56, Devanand Chatrathi wrote:
> How to exclude Logger from PIT coverage. Is it a good practice to exclude
> logger or we should cover that also.
What logger do you use? Have you checked that they are reported related
survived mutations?
AFAIK commonly used loggers are ignored by PIT.
Marcin
Devanand Chatrathi
unread,
Jun 21, 2015, 3:37:42 PM6/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pitu...@googlegroups.com
I am using Log4J logger but somehow avoidCallsTo is not being recognized. can you see any potential problems.
henry
unread,
Jun 22, 2015, 5:24:12 AM6/22/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pitu...@googlegroups.com, devanand....@gmail.com
On Sunday, 21 June 2015 20:37:42 UTC+1, Devanand Chatrathi wrote:
I am using Log4J logger but somehow avoidCallsTo is not being recognized. can you see any potential problems.
If you're using the Log4J logger directly then everything should just work. The usual problem is that the logger has been wrapped up in a customer logger in a different package. If you've done this you'll need to add the custom logger to the avoidCallsTo list.
Can you post your config and an example of the code you expect not be mutated?