Error logs filling up with Guff...

Peter Trubshaw May 14, 2012

Hey there,

Just trying to keep my error logs clean(ish) and have noticed that I am getting a lot of exceptions for each workflow validation that is executed. Can you tell me how I can prevent my logs from filling up with this info?

for example

{noformat}

2012-05-15 11:17:05,650 http-8080-13 ERROR nigel.rheam 677x237029x1 phhtim 10.202.36.53 /secure/CommentAssignIssue.jspa atlassian.jira.workflow.OSWorkflowManager Caught exception while attempting to perform action 1211 from workflow 50353 on issue 'LB-5430'

InvalidInputException: Error map: {customfield_12501=Complexity is required.} Error list:

at com.googlecode.jsu.util.ValidatorErrorsBuilder.process(ValidatorErrorsBuilder.java:41)

at com.googlecode.jsu.workflow.validator.GenericValidator.validate(GenericValidator.java:75)

at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1331)

at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1022)

at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567)

at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:905)

at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:865)

at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:449)

at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:196)

at webwork.action.ActionSupport.execute(ActionSupport.java:165)

snip...

{noformat}

and...

{noformat}

2012-05-15 11:34:21,907 http-8080-2 ERROR adam.bielasty 694x238246x1 oselx1 10.202.36.57 /secure/WorkflowUIDispatcher.jspa atlassian.jira.workflow.OSWorkflowManager Caught exception while attempting to perform action 861 from workflow 50353 on issue 'LB-5430'

InvalidInputException: Error map: {} Error list: Lead Developer is required.

at com.googlecode.jsu.util.ValidatorErrorsBuilder.process(ValidatorErrorsBuilder.java:41)

at com.googlecode.jsu.workflow.validator.GenericValidator.validate(GenericValidator.java:75)

at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1331)

at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1022)

at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567)

at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:905)

at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:865)

at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:449)

at com.atlassian.jira.web.action.workflow.SimpleWorkflowAction.doExecute(SimpleWorkflowAction.java:30)

snip...

{noformat}

3 answers

0 votes
Mark Symons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2012

This is a problem that causes me a lot of grief. For me, the "Guff" is 330 lines of exception logging (over 30kb) just for a single "comment required" validator. It tends to make the logs rather hard to work with (but I will look at Jozef's filtering... thanks for that).

The "won't fix" bug is JRA-8100. The reason given for not fixing is that all would be taken care of by a fix to JRA-5783 (Make field required only for one state transition). This would indeed be a very useful new bit of functionality and would address the "comment required" example... but not cater for other types of validator (Right, Jamie?).

I believe that JRA-8100 needs to be re-opened.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2012

Correct, because they would not implement it threw throwing an InvalidInputException. I agree, it should be reopened.

0 votes
Jozef Kotlár
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2012

See my answer to my similar question, if this solution suits you.

The solution is to filter out this stacktrace using custom log4j filter and optionally to save it to another log file.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2012

Oops sorry, meant to link to your q in my answer.

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2012

You can't... any validator that fails logs a stack trace. It's a pain...

In fact I see there is a q for this already, and a bug marked "won't fix"

Suggest an answer

Log in or Sign up to answer