Return-Path: X-Original-To: apmail-poi-dev-archive@www.apache.org Delivered-To: apmail-poi-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D2DD1D06A for ; Thu, 2 Aug 2012 12:58:45 +0000 (UTC) Received: (qmail 91430 invoked by uid 500); 2 Aug 2012 12:58:45 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 91369 invoked by uid 500); 2 Aug 2012 12:58:45 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 91359 invoked by uid 99); 2 Aug 2012 12:58:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 12:58:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2012 12:58:44 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 1A3B15260; Thu, 2 Aug 2012 12:58:24 +0000 (UTC) From: bugzilla@apache.org To: dev@poi.apache.org Subject: [Bug 53642] New: [PATCH] XLS formula evaluation logging Date: Thu, 02 Aug 2012 12:58:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: POI Overall X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: twapache@online.de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: priority bug_id assigned_to short_desc bug_severity classification reporter rep_platform bug_status version component product Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=53642 Priority: P2 Bug ID: 53642 Assignee: dev@poi.apache.org Summary: [PATCH] XLS formula evaluation logging Severity: normal Classification: Unclassified Reporter: twapache@online.de Hardware: PC Status: NEW Version: 3.9-dev Component: POI Overall Product: POI Created attachment 29152 --> https://issues.apache.org/bugzilla/attachment.cgi?id=29152&action=edit ant-generated patch file (no new files, only changes to existing source) For a detailed analysis of the formula evalution - especially in cases of exceptions or wrong results - a detailed logging of the recursive evaluation is very helpful. I needed this for a very complex XLS to find the missing POI implementations (I will add them as separate patch). Usage documentation with source extract is given in documentation/content/xdocs/spreadsheet/eval.xml at the end (I did not test the HTML generation for this). Changes in detail: - org/apache/poi/ss/formula/WorkbookEvaluator.java * The main extension go here, inside evaluateFormula(). * see spreadsheet/eval.xml and source comments for details * Note: I know, the use of a public static attribute is a no-go for real code, but this is for specific development use only, simple to use in this way, and worst case situation is missing or surplus logging. - SystemOutLogger.java * added a shortcut of the log level in the output (helps to find good logging configuration) - POILogger.java * made log level constants final * added string representation for the log levels (used by SystemOutLogger) - org/apache/poi/hssf/usermodel/HSSFSheet.java * Bugfix for logging because "cval" is not always an instance of Record (results in ClassCastExceptions when logging is on debug level). * added {..} around some not very simple one-line if-blocks Tested with HSSFWorkbook only. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional commands, e-mail: dev-help@poi.apache.org