From ac93bd4473f2dd704b52d39e536ffb53a0ffcf44 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 27 Feb 2013 20:58:38 -0500 Subject: [PATCH] IDEMPIERE-638 Check log level before calling logging method / log.info / Thanks to Richard Morales --- .../org/compiere/model/CalloutInventory.java | 2 +- .../org/compiere/model/CalloutInvoice.java | 4 +- .../compiere/model/CalloutInvoiceBatch.java | 2 +- .../src/org/compiere/model/CalloutOrder.java | 4 +- .../org/compiere/model/CalloutRequest.java | 6 +- .../compiere/model/CalloutRequisition.java | 2 +- .../adempiere/process/ASPGenerateFields.java | 2 +- .../adempiere/process/ASPGenerateLevel.java | 2 +- .../process/ApplyMigrationScripts.java | 3 +- .../process/ClientAcctProcessor.java | 2 +- .../src/org/adempiere/process/Export.java | 12 +-- .../process/ImmediateBankTransfer.java | 2 +- .../adempiere/process/ImportPriceList.java | 12 +-- .../adempiere/process/InitialClientSetup.java | 4 +- .../process/PrepareMigrationScripts.java | 2 +- .../compiere/install/LanguageMaintenance.java | 2 +- .../process/AD_PrintPaper_Default.java | 2 +- .../compiere/process/AcctSchemaCopyAcct.java | 2 +- .../process/AcctSchemaDefaultCopy.java | 2 +- .../src/org/compiere/process/Aging.java | 4 +- .../org/compiere/process/AllocationAuto.java | 22 ++--- .../org/compiere/process/AllocationReset.java | 2 +- .../org/compiere/process/AssetDelivery.java | 2 +- .../src/org/compiere/process/BOMValidate.java | 4 +- .../src/org/compiere/process/BOMVerify.java | 4 +- .../org/compiere/process/BPGroupAcctCopy.java | 2 +- .../org/compiere/process/BPartnerOrgLink.java | 2 +- .../compiere/process/BPartnerOrgUnLink.java | 2 +- .../compiere/process/BPartnerValidate.java | 2 +- .../process/BankStatementMatcher.java | 2 +- .../process/BankStatementPayment.java | 2 +- .../compiere/process/ChangeLogProcess.java | 6 +- .../src/org/compiere/process/ColumnSync.java | 2 +- .../compiere/process/CommissionAPInvoice.java | 2 +- .../org/compiere/process/CommissionCalc.java | 2 +- .../org/compiere/process/CommissionCopy.java | 2 +- .../process/CopyColumnsFromTable.java | 2 +- .../compiere/process/CopyFromBankStmt.java | 2 +- .../org/compiere/process/CopyFromInvoice.java | 2 +- .../org/compiere/process/CopyFromJournal.java | 2 +- .../compiere/process/CopyFromJournalDoc.java | 2 +- .../org/compiere/process/CopyFromOrder.java | 2 +- .../org/compiere/process/CopyFromProject.java | 2 +- .../src/org/compiere/process/CopyOrder.java | 2 +- .../src/org/compiere/process/CopyProduct.java | 2 +- .../src/org/compiere/process/CostCreate.java | 2 +- .../src/org/compiere/process/CostUpdate.java | 6 +- .../compiere/process/DiscountSchemaReSeq.java | 4 +- .../compiere/process/DistributionCreate.java | 4 +- .../org/compiere/process/DistributionRun.java | 26 ++--- .../compiere/process/DistributionVerify.java | 4 +- .../process/DocTypeCounterValidate.java | 4 +- .../org/compiere/process/DunningPrint.java | 2 +- .../compiere/process/DunningRunCreate.java | 4 +- .../src/org/compiere/process/EMailTest.java | 3 +- .../compiere/process/EntityTypeRegister.java | 4 +- .../compiere/process/ExpenseAPInvoice.java | 2 +- .../org/compiere/process/ExpenseSOrder.java | 2 +- .../org/compiere/process/FactAcctReset.java | 8 +- .../org/compiere/process/ImportAccount.java | 2 +- .../compiere/process/ImportBankStatement.java | 44 ++++----- .../process/ImportConversionRate.java | 4 +- .../org/compiere/process/ImportDelete.java | 2 +- .../org/compiere/process/ImportGLJournal.java | 12 +-- .../compiere/process/ImportInOutConfirm.java | 4 +- .../org/compiere/process/ImportInventory.java | 4 +- .../org/compiere/process/ImportInvoice.java | 2 +- .../src/org/compiere/process/ImportOrder.java | 2 +- .../org/compiere/process/ImportPayment.java | 42 ++++----- .../org/compiere/process/ImportProduct.java | 20 ++-- .../compiere/process/InOutCreateConfirm.java | 2 +- .../compiere/process/InOutCreateInvoice.java | 2 +- .../org/compiere/process/InOutGenerate.java | 2 +- .../process/InventoryCountCreate.java | 4 +- .../process/InventoryCountUpdate.java | 12 +-- .../org/compiere/process/InventoryValue.java | 2 +- .../compiere/process/InvoiceBatchProcess.java | 4 +- .../compiere/process/InvoiceCreateInOut.java | 2 +- .../org/compiere/process/InvoiceGenerate.java | 2 +- .../src/org/compiere/process/InvoiceNGL.java | 22 ++--- .../process/InvoicePayScheduleValidate.java | 2 +- .../org/compiere/process/InvoicePrint.java | 2 +- .../org/compiere/process/InvoiceWriteOff.java | 2 +- .../src/org/compiere/process/IssueReport.java | 4 +- .../process/LandedCostDistribute.java | 4 +- .../compiere/process/LoadBankStatement.java | 12 ++- .../org/compiere/process/MatchInvDelete.java | 4 +- .../org/compiere/process/MatchPODelete.java | 4 +- .../src/org/compiere/process/NoteDelete.java | 2 +- .../compiere/process/OrderBatchProcess.java | 4 +- .../process/OrderLineCreateProduction.java | 2 +- .../process/OrderLineCreateShipment.java | 2 +- .../src/org/compiere/process/OrderOpen.java | 2 +- .../org/compiere/process/OrderPOCreate.java | 4 +- .../process/OrderPayScheduleValidate.java | 2 +- .../org/compiere/process/OrderRePrice.java | 2 +- .../org/compiere/process/OrgOwnership.java | 8 +- .../org/compiere/process/PackageCreate.java | 2 +- .../process/PaySelectionCreateCheck.java | 2 +- .../process/PaySelectionCreateFrom.java | 2 +- .../org/compiere/process/PaymentOnline.java | 2 +- .../compiere/process/PaymentTermValidate.java | 2 +- .../compiere/process/PeriodControlStatus.java | 2 +- .../org/compiere/process/PeriodStatus.java | 2 +- .../process/ProductCategoryAcctCopy.java | 2 +- .../compiere/process/ProductUOMConvert.java | 4 +- .../org/compiere/process/ProjectGenOrder.java | 2 +- .../org/compiere/process/ProjectGenPO.java | 2 +- .../org/compiere/process/ProjectIssue.java | 4 +- .../compiere/process/ProjectLinePricing.java | 2 +- .../process/ProjectPhaseGenOrder.java | 2 +- .../org/compiere/process/ProjectSetType.java | 2 +- .../src/org/compiere/process/Recurring.java | 2 +- .../org/compiere/process/RegisterSystem.java | 4 +- .../org/compiere/process/ReplenishReport.java | 10 +- .../process/ReplenishReportProduction.java | 12 +-- .../compiere/process/ReplicationLocal.java | 12 +-- .../compiere/process/ReplicationRemote.java | 14 +-- .../process/ReportColumnSet_Copy.java | 2 +- .../compiere/process/ReportLineSet_Copy.java | 2 +- .../process/RequestEMailProcessor.java | 18 ++-- .../org/compiere/process/RequestInvoice.java | 2 +- .../org/compiere/process/RequestReOpen.java | 2 +- .../compiere/process/RequisitionPOCreate.java | 6 +- .../src/org/compiere/process/RfQClose.java | 2 +- .../org/compiere/process/RfQCopyLines.java | 2 +- .../src/org/compiere/process/RfQCreate.java | 2 +- .../src/org/compiere/process/RfQCreatePO.java | 2 +- .../src/org/compiere/process/RfQCreateSO.java | 2 +- .../process/RfQResponseCComplete.java | 2 +- .../compiere/process/RfQResponseInvite.java | 2 +- .../org/compiere/process/RfQResponseRank.java | 2 +- .../compiere/process/RoleAccessUpdate.java | 2 +- .../org/compiere/process/SendMailText.java | 6 +- .../org/compiere/process/StorageCleanup.java | 6 +- .../process/SynchronizeTerminology.java | 86 ++++++++--------- .../src/org/compiere/process/TabCopy.java | 2 +- .../org/compiere/process/TabCreateFields.java | 2 +- .../compiere/process/TableCreateColumns.java | 6 +- .../process/TaxDeclarationCreate.java | 2 +- .../org/compiere/process/TransactionXRef.java | 2 +- .../compiere/process/TranslationDocSync.java | 2 +- .../org/compiere/process/TreeMaintenance.java | 2 +- .../org/compiere/process/UserPassword.java | 2 +- ...OnlineAuthorizationPaymentTransaction.java | 2 +- .../src/org/compiere/process/WindowCopy.java | 2 +- .../compiere/process/YearCreatePeriods.java | 2 +- .../adempiere/process/DepositBatchClose.java | 2 +- .../adempiere/process/ShipperCopyFrom.java | 2 +- .../src/org/adempiere/util/GenerateModel.java | 8 +- .../org/adempiere/util/GenerateModelJPA.java | 10 +- .../src/org/compiere/Adempiere.java | 2 +- .../src/org/compiere/MigrateData.java | 2 +- .../src/org/compiere/acct/Doc.java | 11 +-- .../org/compiere/acct/Doc_AllocationHdr.java | 6 +- .../src/org/compiere/acct/Doc_Production.java | 2 +- .../src/org/compiere/acct/Fact.java | 8 +- .../src/org/compiere/cm/CStageValidate.java | 2 +- .../src/org/compiere/cm/WebProjectDeploy.java | 2 +- .../src/org/compiere/db/CreateAdempiere.java | 12 +-- .../src/org/compiere/db/JDBCInfo.java | 8 +- .../src/org/compiere/db/LDAP.java | 4 +- .../src/org/compiere/dbPort/Convert.java | 32 ++++--- .../org/compiere/dbPort/Convert_SQL92.java | 30 +++--- .../org/compiere/impexp/CopyImportFormat.java | 2 +- .../src/org/compiere/impexp/ImpFormat.java | 2 +- .../compiere/interfaces/impl/ServerBean.java | 4 +- .../src/org/compiere/model/CalloutEngine.java | 6 +- .../src/org/compiere/model/GridTab.java | 6 +- .../src/org/compiere/model/GridTable.java | 20 ++-- .../src/org/compiere/model/GridWindow.java | 2 +- .../src/org/compiere/model/MAcctSchema.java | 3 +- .../org/compiere/model/MAllocationHdr.java | 24 ++--- .../src/org/compiere/model/MAsset.java | 4 +- .../org/compiere/model/MAssetAddition.java | 14 +-- .../org/compiere/model/MAssetDisposed.java | 6 +- .../org/compiere/model/MBankStatement.java | 22 ++--- .../compiere/model/MBankStatementLoader.java | 2 +- .../src/org/compiere/model/MCash.java | 22 ++--- .../src/org/compiere/model/MClient.java | 15 +-- .../src/org/compiere/model/MClientShare.java | 6 +- .../src/org/compiere/model/MCostDetail.java | 2 +- .../src/org/compiere/model/MDepositBatch.java | 6 +- .../compiere/model/MDepreciationEntry.java | 8 +- .../compiere/model/MDepreciationWorkfile.java | 4 +- .../org/compiere/model/MDiscountSchema.java | 2 +- .../src/org/compiere/model/MDistribution.java | 2 +- .../org/compiere/model/MDistributionList.java | 2 +- .../org/compiere/model/MDunningRunEntry.java | 2 +- .../src/org/compiere/model/MInOut.java | 26 ++--- .../src/org/compiere/model/MInOutConfirm.java | 26 ++--- .../src/org/compiere/model/MInventory.java | 22 ++--- .../src/org/compiere/model/MInvoice.java | 24 ++--- .../src/org/compiere/model/MInvoiceLine.java | 6 +- .../src/org/compiere/model/MJournal.java | 22 ++--- .../src/org/compiere/model/MJournalBatch.java | 22 ++--- .../src/org/compiere/model/MLocation.java | 2 +- .../org/compiere/model/MLocatorLookup.java | 2 +- .../src/org/compiere/model/MMediaServer.java | 7 +- .../src/org/compiere/model/MMovement.java | 22 ++--- .../org/compiere/model/MMovementConfirm.java | 26 ++--- .../src/org/compiere/model/MOrder.java | 38 ++++---- .../src/org/compiere/model/MPInstance.java | 12 ++- .../src/org/compiere/model/MPayment.java | 34 +++---- .../compiere/model/MPaymentTransaction.java | 10 +- .../src/org/compiere/model/MProcess.java | 4 +- .../src/org/compiere/model/MProject.java | 7 +- .../src/org/compiere/model/MProjectPhase.java | 7 +- .../src/org/compiere/model/MRMA.java | 22 ++--- .../src/org/compiere/model/MRequest.java | 2 +- .../src/org/compiere/model/MRequisition.java | 23 ++--- .../src/org/compiere/model/MRole.java | 2 +- .../src/org/compiere/model/MSchedule.java | 4 +- .../src/org/compiere/model/MSession.java | 2 +- .../src/org/compiere/model/MSetup.java | 8 +- .../src/org/compiere/model/MStore.java | 6 +- .../src/org/compiere/model/MTest.java | 7 +- .../src/org/compiere/model/MTimeExpense.java | 22 ++--- .../src/org/compiere/model/MTree.java | 2 +- .../src/org/compiere/model/MWarehouse.java | 3 +- .../src/org/compiere/model/PO.java | 2 +- .../src/org/compiere/model/Tax.java | 2 +- .../src/org/compiere/print/DataEngine.java | 4 +- .../src/org/compiere/print/MPrintFormat.java | 4 +- .../compiere/print/MPrintFormatProcess.java | 4 +- .../src/org/compiere/print/PrintData.java | 4 +- .../org/compiere/print/PrintFormatUtil.java | 2 +- .../src/org/compiere/print/ReportEngine.java | 10 +- .../compiere/print/layout/LayoutEngine.java | 8 +- .../compiere/process/AdempiereService.java | 8 +- .../compiere/process/DocActionTemplate.java | 23 ++--- .../org/compiere/process/DocumentEngine.java | 2 +- .../org/compiere/process/FactReconcile.java | 4 +- .../org/compiere/process/PosKeyGenerate.java | 3 +- .../org/compiere/process/ProjectClose.java | 2 +- .../src/org/compiere/process/SvrProcess.java | 4 +- .../src/org/compiere/report/FinReport.java | 14 +-- .../src/org/compiere/sla/SLAGoalProcess.java | 2 +- .../org/compiere/sla/SLAMeasureProcess.java | 2 +- .../src/org/compiere/util/CLogMgt.java | 7 +- .../src/org/compiere/util/DB.java | 8 +- .../src/org/compiere/util/EMail.java | 6 +- .../src/org/compiere/util/Language.java | 2 +- .../src/org/compiere/util/Login.java | 48 ++++++---- .../src/org/compiere/util/Secure.java | 2 +- .../src/org/compiere/util/SecureEngine.java | 26 ++--- .../src/org/compiere/util/Trx.java | 4 +- .../src/org/compiere/util/WebEnv.java | 8 +- .../src/org/compiere/util/WebInfo.java | 2 +- .../src/org/compiere/util/WebLogin.java | 8 +- .../src/org/compiere/util/WebSessionCtx.java | 10 +- .../src/org/compiere/util/WebUser.java | 8 +- .../src/org/compiere/util/WebUtil.java | 6 +- .../src/org/compiere/wf/MWFActivity.java | 12 +-- .../src/org/compiere/wf/MWFProcess.java | 2 +- .../src/org/compiere/wf/MWorkflow.java | 2 +- .../src/org/compiere/wf/WFActivityManage.java | 2 +- .../src/org/compiere/wf/WFProcessManage.java | 2 +- .../org/compiere/wf/WorkflowMoveToClient.java | 2 +- .../src/org/compiere/wf/WorkflowValidate.java | 4 +- .../src/org/eevolution/model/MDDOrder.java | 24 ++--- .../eevolution/model/MPPProductPlanning.java | 3 +- .../org/eevolution/process/BankTransfer.java | 2 +- .../org/eevolution/process/CopyFromBOM.java | 2 +- .../process/ExportFormatGenerator.java | 14 +-- .../src/org/globalqss/process/CashFlow.java | 16 ++-- .../globalqss/process/GLJournalGenerate.java | 2 +- .../org/idempiere/fa/model/CalloutAsset.java | 5 +- .../idempiere/fa/model/ModelValidator.java | 3 +- .../fa/process/ImportFixedAsset.java | 2 +- .../fa/process/ProjectCreateAsset.java | 2 +- .../src/compiere/model/MyValidator.java | 16 ++-- .../src/org/compiere/test/OrderTest.java | 2 +- .../src/test/functional/AlertTest.java | 10 +- .../org/compiere/install/ConfigAppServer.java | 7 +- .../src/org/compiere/install/ConfigVM.java | 5 +- .../compiere/install/ConfigurationData.java | 12 +-- .../src/org/compiere/install/KeyStoreMgt.java | 2 +- .../pipo2/handler/AdElementHandler.java | 3 +- .../handler/CodeSnippetElementHandler.java | 11 ++- .../handler/CommonTranslationHandler.java | 3 +- .../pipo2/handler/DistFileElementHandler.java | 9 +- .../handler/FieldGroupElementHandler.java | 5 +- .../handler/GenericPOElementHandler.java | 3 +- .../pipo2/handler/MenuElementHandler.java | 4 +- .../handler/SQLStatementElementHandler.java | 6 +- .../pipo2/handler/WorkflowElementHandler.java | 5 +- .../src/org/adempiere/pipo/PackIn.java | 8 +- .../src/org/adempiere/pipo/PackInHandler.java | 16 ++-- .../src/org/adempiere/pipo/PackOut.java | 4 +- .../src/org/adempiere/pipo/PackRoll.java | 2 +- .../pipo/handler/AdElementHandler.java | 3 +- .../handler/CodeSnipitElementHandler.java | 13 +-- .../pipo/handler/ColumnElementHandler.java | 2 +- .../handler/CommonTranslationHandler.java | 3 +- .../pipo/handler/DataElementHandler.java | 10 +- .../pipo/handler/DistFileElementHandler.java | 11 ++- .../handler/DynValRuleElementHandler.java | 2 +- .../handler/EntityTypeElementHandler.java | 3 +- .../pipo/handler/FieldElementHandler.java | 3 +- .../handler/FieldGroupElementHandler.java | 3 +- .../pipo/handler/FormElementHandler.java | 3 +- .../pipo/handler/ImpFormatElementHandler.java | 2 +- .../handler/ImpFormatRowElementHandler.java | 3 +- .../pipo/handler/MenuElementHandler.java | 8 +- .../pipo/handler/MessageElementHandler.java | 3 +- .../handler/ModelValidatorElementHandler.java | 3 +- .../handler/PrintFormatElementHandler.java | 2 +- .../PrintFormatItemElementHandler.java | 3 +- .../handler/PrintPaperElementHandler.java | 3 +- .../pipo/handler/ProcessElementHandler.java | 2 +- .../pipo/handler/ReferenceElementHandler.java | 2 +- .../handler/ReferenceListElementHandler.java | 3 +- .../handler/ReportViewColElementHandler.java | 3 +- .../handler/ReportViewElementHandler.java | 2 +- .../pipo/handler/RoleElementHandler.java | 2 +- .../handler/SQLStatementElementHandler.java | 6 +- .../pipo/handler/TabElementHandler.java | 2 +- .../pipo/handler/TableElementHandler.java | 2 +- .../pipo/handler/TaskElementHandler.java | 3 +- .../pipo/handler/WindowElementHandler.java | 2 +- .../pipo/handler/WorkflowElementHandler.java | 6 +- .../handler/WorkflowNodeElementHandler.java | 5 +- ...rkflowNodeNextConditionElementHandler.java | 3 +- .../WorkflowNodeNextElementHandler.java | 3 +- .../src/org/adempiere/pipo2/IDFinder.java | 3 +- .../src/org/adempiere/pipo2/PackIn.java | 4 +- .../org/adempiere/pipo2/PackInHandler.java | 2 +- .../org/adempiere/pipo2/PackInProcess.java | 5 +- .../org/adempiere/pipo2/PackOutProcess.java | 4 +- .../server/rpl/imp/FileImportProcessor.java | 7 +- .../server/rpl/imp/TopicImportProcessor.java | 15 ++- .../server/rpl/imp/TopicListener.java | 2 +- .../adempiere/model/ExportModelValidator.java | 17 ++-- .../process/rpl/exp/ExportHelper.java | 27 +++--- .../process/rpl/exp/HDDExportProcessor.java | 7 +- .../process/rpl/exp/ModelExporter.java | 2 +- .../process/rpl/exp/TopicExportProcessor.java | 7 +- .../process/rpl/imp/ImportHelper.java | 94 ++++++++++--------- .../process/rpl/imp/ModelImporter.java | 2 +- .../src/org/compiere/utils/MD5Impl.java | 3 +- .../org/compiere/report/ReportStarter.java | 30 +++--- .../server/org/compiere/ldap/LdapMessage.java | 21 ++--- .../server/org/compiere/ldap/LdapResult.java | 2 +- .../org/compiere/server/AdempiereServer.java | 3 +- .../compiere/server/AdempiereServerGroup.java | 4 +- .../compiere/server/AdempiereServerMgr.java | 8 +- .../org/compiere/server/AlertProcessor.java | 2 +- .../org/compiere/server/EMailProcessor.java | 2 +- .../server/org/compiere/server/Scheduler.java | 2 +- .../org/compiere/web/AdempiereMonitor.java | 16 ++-- .../compiere/web/AdempiereMonitorFilter.java | 2 +- .../adempiere/apps/graph/HtmlDashboard.java | 2 +- .../src/org/adempiere/apps/graph/PAPanel.java | 3 +- .../src/org/adempiere/apps/graph/ViewPI.java | 2 +- .../src/org/adempiere/plaf/PLAFEditor.java | 2 +- .../org/adempiere/plaf/PLAFEditorPanel.java | 3 +- .../src/org/compiere/AdempiereClient.java | 2 +- .../src/org/compiere/acct/AcctViewer.java | 6 +- .../src/org/compiere/apps/ADialog.java | 12 +-- .../src/org/compiere/apps/AEnv.java | 6 +- .../src/org/compiere/apps/AMenu.java | 4 +- .../src/org/compiere/apps/APanel.java | 36 +++---- .../src/org/compiere/apps/AWindow.java | 2 +- .../src/org/compiere/apps/Attachment.java | 2 +- .../org/compiere/apps/BeanShellEditor.java | 2 +- .../src/org/compiere/apps/EMailDialog.java | 2 +- .../src/org/compiere/apps/GroovyEditor.java | 2 +- .../src/org/compiere/apps/ProcessDialog.java | 2 +- .../org/compiere/apps/ProcessModalDialog.java | 2 +- .../src/org/compiere/apps/RecordInfo.java | 2 +- .../org/compiere/apps/form/ArchiveViewer.java | 6 +- .../src/org/compiere/apps/form/FormFrame.java | 4 +- .../compiere/apps/form/VAttributeGrid.java | 6 +- .../src/org/compiere/apps/form/VCharge.java | 2 +- .../src/org/compiere/apps/form/VGenPanel.java | 2 +- .../src/org/compiere/apps/form/VInOutGen.java | 2 +- .../org/compiere/apps/form/VInvoiceGen.java | 2 +- .../src/org/compiere/apps/form/VMatch.java | 2 +- .../src/org/compiere/apps/form/VMerge.java | 2 +- .../src/org/compiere/apps/form/VPayPrint.java | 2 +- .../compiere/apps/form/VResetPassword.java | 2 +- .../src/org/compiere/apps/form/VTreeBOM.java | 2 +- .../compiere/apps/form/VTreeMaintenance.java | 12 +-- .../src/org/compiere/apps/search/Find.java | 4 +- .../src/org/compiere/apps/search/Info.java | 2 +- .../org/compiere/apps/search/InfoAsset.java | 2 +- .../org/compiere/apps/search/InfoGeneral.java | 2 +- .../org/compiere/apps/search/InfoProduct.java | 4 +- .../compiere/apps/search/InfoSchedule.java | 2 +- .../apps/search/PAttributeInstance.java | 2 +- .../src/org/compiere/apps/wf/WFActivity.java | 2 +- .../src/org/compiere/apps/wf/WFPanel.java | 2 +- .../src/org/compiere/apps/wf/WFPopupItem.java | 8 +- .../org/compiere/grid/RecordAccessDialog.java | 2 +- .../grid/VCreateFromDepositBatchUI.java | 2 +- .../compiere/grid/VCreateFromInvoiceUI.java | 2 +- .../grid/VCreateFromPackageShipmentUI.java | 2 +- .../org/compiere/grid/VCreateFromRMAUI.java | 2 +- .../compiere/grid/VCreateFromShipmentUI.java | 2 +- .../compiere/grid/VCreateFromStatementUI.java | 2 +- .../src/org/compiere/grid/VTabbedPane.java | 2 +- .../src/org/compiere/grid/ed/Calendar.java | 2 +- .../src/org/compiere/grid/ed/MDocNumber.java | 2 +- .../src/org/compiere/grid/ed/VAccount.java | 2 +- .../src/org/compiere/grid/ed/VBPartner.java | 2 +- .../src/org/compiere/grid/ed/VBinary.java | 4 +- .../org/compiere/grid/ed/VImageDialog.java | 2 +- .../src/org/compiere/grid/ed/VLookup.java | 10 +- .../src/org/compiere/grid/ed/VNumber.java | 2 +- .../compiere/grid/ed/VPAttributeDialog.java | 2 +- .../org/compiere/grid/ed/VPaymentEditor.java | 4 +- .../org/compiere/grid/tree/VTreePanel.java | 4 +- .../org/compiere/pos/CashSubFunctions.java | 3 +- .../src/org/compiere/pos/POSKeyboard.java | 2 +- .../src/org/compiere/pos/PosBasePanel.java | 2 +- .../src/org/compiere/pos/PosKeyPanel.java | 2 +- .../src/org/compiere/pos/PosOrderModel.java | 2 +- .../src/org/compiere/pos/QueryBPartner.java | 2 +- .../src/org/compiere/pos/QueryProduct.java | 2 +- .../src/org/compiere/pos/QueryTicket.java | 7 +- .../src/org/compiere/pos/SubCheckout.java | 3 +- .../src/org/compiere/pos/SubCurrentLine.java | 2 +- .../src/org/compiere/pos/SubOrder.java | 4 +- .../src/org/compiere/print/Viewer.java | 6 +- .../org/eevolution/form/VInOutInvoiceGen.java | 6 +- .../org/compiere/apps/form/Allocation.java | 2 +- .../src/org/compiere/apps/form/Archive.java | 2 +- .../src/org/compiere/apps/form/InOutGen.java | 2 +- .../org/compiere/apps/form/TrxMaterial.java | 2 +- .../compiere/grid/CreateFromDepositBatch.java | 2 +- .../org/compiere/grid/CreateFromInvoice.java | 2 +- .../grid/CreateFromPackageShipment.java | 2 +- .../src/org/compiere/grid/CreateFromRMA.java | 2 +- .../org/compiere/grid/CreateFromShipment.java | 2 +- .../compiere/grid/CreateFromStatement.java | 2 +- .../org/compiere/grid/PaymentFormCheck.java | 7 +- .../compiere/grid/PaymentFormCreditCard.java | 7 +- .../org/compiere/grid/PaymentFormDirect.java | 7 +- .../src/org/compiere/install/Translation.java | 6 +- .../compiere/wstore/AdvertisementServlet.java | 5 +- .../src/org/compiere/wstore/AssetServlet.java | 4 +- .../org/compiere/wstore/BasketServlet.java | 6 +- .../org/compiere/wstore/CheckOutServlet.java | 7 +- .../src/org/compiere/wstore/Counter.java | 2 +- .../src/org/compiere/wstore/EMailServlet.java | 7 +- .../org/compiere/wstore/ExpenseServlet.java | 5 +- .../src/org/compiere/wstore/InfoServlet.java | 6 +- .../org/compiere/wstore/InvoiceServlet.java | 17 ++-- .../compiere/wstore/IssueReportServlet.java | 6 +- .../org/compiere/wstore/LocationServlet.java | 5 +- .../src/org/compiere/wstore/LoginServlet.java | 8 +- .../src/org/compiere/wstore/NoteServlet.java | 10 +- .../src/org/compiere/wstore/OrderServlet.java | 6 +- .../org/compiere/wstore/PaymentServlet.java | 18 ++-- .../org/compiere/wstore/ProductServlet.java | 7 +- .../compiere/wstore/RegistrationServlet.java | 6 +- .../org/compiere/wstore/RequestServlet.java | 8 +- .../src/org/compiere/wstore/RfQServlet.java | 8 +- .../org/compiere/wstore/SearchServlet.java | 5 +- .../src/org/compiere/wstore/SingleItem.java | 5 +- .../src/org/compiere/wstore/StoreFilter.java | 2 +- .../org/compiere/wstore/UpdateServlet.java | 7 +- .../src/org/compiere/wstore/WebOrder.java | 2 +- .../org/compiere/wstore/WorkflowServlet.java | 10 +- .../db/oracle/config/ConfigOracle.java | 20 ++-- .../postgresql/config/ConfigPostgreSQL.java | 9 +- .../webconsole/SecurityProviderImpl.java | 4 +- .../idempiere/fitnesse/fixture/Service.java | 3 +- .../idempiere/fitrecorder/FitRecorder.java | 9 +- .../src/net/sf/compilo/report/ReportInfo.java | 4 +- .../src/net/sf/compilo/report/ReportPool.java | 5 +- .../sf/compilo/report/ReportProcessor.java | 3 +- .../adinterface/CompiereService.java | 3 +- .../adinterface/ModelADServiceImpl.java | 2 +- .../org/idempiere/adinterface/Process.java | 2 +- 476 files changed, 1538 insertions(+), 1410 deletions(-) diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInventory.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInventory.java index 88130d3b31..96085d553e 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInventory.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInventory.java @@ -125,7 +125,7 @@ public class CalloutInventory extends CalloutEngine } // - log.info("M_Product_ID=" + M_Product_ID + if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + M_Product_ID + ", M_Locator_ID=" + M_Locator_ID + ", M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID + " - QtyBook=" + bd); diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java index 3ef217b696..5a6c1192ed 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoice.java @@ -467,7 +467,7 @@ public class CalloutInvoice extends CalloutEngine int C_Tax_ID = Tax.get(ctx, M_Product_ID, C_Charge_ID, billDate, shipDate, AD_Org_ID, M_Warehouse_ID, billC_BPartner_Location_ID, shipC_BPartner_Location_ID, Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y")); - log.info("Tax ID=" + C_Tax_ID); + if (log.isLoggable(Level.INFO)) log.info("Tax ID=" + C_Tax_ID); // if (C_Tax_ID == 0) mTab.fireDataStatusEEvent(CLogger.retrieveError()); @@ -649,7 +649,7 @@ public class CalloutInvoice extends CalloutEngine BigDecimal LineNetAmt = QtyInvoiced.multiply(PriceActual); if (LineNetAmt.scale() > StdPrecision) LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP); - log.info("amt = LineNetAmt=" + LineNetAmt); + if (log.isLoggable(Level.INFO)) log.info("amt = LineNetAmt=" + LineNetAmt); mTab.setValue("LineNetAmt", LineNetAmt); // Calculate Tax Amount for PO diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java index 12c51fc002..03c23608da 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutInvoiceBatch.java @@ -324,7 +324,7 @@ public class CalloutInvoiceBatch extends CalloutEngine int C_Tax_ID = Tax.get(ctx, 0, C_Charge_ID, billDate, shipDate, AD_Org_ID, M_Warehouse_ID, C_BPartner_Location_ID, C_BPartner_Location_ID, Env.getContext(ctx, WindowNo, "IsSOTrx").equals("Y")); - log.info("Tax ID=" + C_Tax_ID); + if (log.isLoggable(Level.INFO)) log.info("Tax ID=" + C_Tax_ID); // if (C_Tax_ID == 0) mTab.fireDataStatusEEvent(CLogger.retrieveError()); diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java index 1101a2595f..880bfd7ef8 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutOrder.java @@ -981,7 +981,7 @@ public class CalloutOrder extends CalloutEngine int C_Tax_ID = Tax.get (ctx, M_Product_ID, C_Charge_ID, billDate, shipDate, AD_Org_ID, M_Warehouse_ID, billC_BPartner_Location_ID, shipC_BPartner_Location_ID, "Y".equals(Env.getContext(ctx, WindowNo, "IsSOTrx"))); - log.info("Tax ID=" + C_Tax_ID); + if (log.isLoggable(Level.INFO)) log.info("Tax ID=" + C_Tax_ID); // if (C_Tax_ID == 0) mTab.fireDataStatusEEvent(CLogger.retrieveError()); @@ -1166,7 +1166,7 @@ public class CalloutOrder extends CalloutEngine BigDecimal LineNetAmt = QtyOrdered.multiply(PriceActual); if (LineNetAmt.scale() > StdPrecision) LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP); - log.info("LineNetAmt=" + LineNetAmt); + if (log.isLoggable(Level.INFO)) log.info("LineNetAmt=" + LineNetAmt); mTab.setValue("LineNetAmt", LineNetAmt); // return ""; diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java index d344cd08af..5ae3fd5c16 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutRequest.java @@ -46,7 +46,7 @@ public class CalloutRequest extends CalloutEngine public String copyMail (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { String colName = mField.getColumnName(); - log.info(colName + "=" + value); + if (log.isLoggable(Level.INFO)) log.info(colName + "=" + value); if (value == null) return ""; @@ -81,7 +81,7 @@ public class CalloutRequest extends CalloutEngine public String copyResponse (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { String colName = mField.getColumnName(); - log.info(colName + "=" + value); + if (log.isLoggable(Level.INFO)) log.info(colName + "=" + value); if (value == null) return ""; @@ -128,7 +128,7 @@ public class CalloutRequest extends CalloutEngine public String type (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { String colName = mField.getColumnName(); - log.info(colName + "=" + value); + if (log.isLoggable(Level.INFO)) log.info(colName + "=" + value); mTab.setValue("R_Status_ID", null); if (value == null) return ""; diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutRequisition.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutRequisition.java index 964eb888b7..87f57e588a 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutRequisition.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutRequisition.java @@ -90,7 +90,7 @@ public class CalloutRequisition extends CalloutEngine if (LineNetAmt.scale() > StdPrecision) LineNetAmt = LineNetAmt.setScale(StdPrecision, BigDecimal.ROUND_HALF_UP); line.setLineNetAmt(LineNetAmt); - log.info("amt - LineNetAmt=" + LineNetAmt); + if (log.isLoggable(Level.INFO)) log.info("amt - LineNetAmt=" + LineNetAmt); // return ""; } // amt diff --git a/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateFields.java b/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateFields.java index 3e0453de57..5f5324f80c 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateFields.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateFields.java @@ -91,7 +91,7 @@ public class ASPGenerateFields extends SvrProcess { StringBuilder msglog = new StringBuilder("ASP_Status=").append(p_ASP_Status) .append(", ASP_Tab_ID=").append(p_ASP_Tab_ID); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); X_ASP_Tab asptab = new X_ASP_Tab(getCtx(), p_ASP_Tab_ID, get_TrxName()); p_ASP_Level_ID = asptab.getASP_Window().getASP_Level_ID(); diff --git a/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateLevel.java b/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateLevel.java index deb77fce45..090cf8eb21 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateLevel.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ASPGenerateLevel.java @@ -110,7 +110,7 @@ public class ASPGenerateLevel extends SvrProcess StringBuilder msglog = new StringBuilder("ASP_Status=").append(p_ASP_Status) .append(", AD_Menu_ID=").append(p_AD_Menu_ID) .append(", IsGenerateFields=").append(p_IsGenerateFields); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); MClientInfo clientInfo = MClientInfo.get(getCtx(), getAD_Client_ID(), get_TrxName()); int AD_Tree_ID = clientInfo.getAD_Tree_Menu_ID(); diff --git a/org.adempiere.base.process/src/org/adempiere/process/ApplyMigrationScripts.java b/org.adempiere.base.process/src/org/adempiere/process/ApplyMigrationScripts.java index 77692c7f1b..99e344cc2b 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ApplyMigrationScripts.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ApplyMigrationScripts.java @@ -36,6 +36,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.util.logging.Level; import org.compiere.process.SvrProcess; import org.compiere.util.CLogger; @@ -64,7 +65,7 @@ public class ApplyMigrationScripts extends SvrProcess { StringBuilder tmpSql = new StringBuilder(new String(scriptArray)); if (tmpSql.length() > 0) { - log.info("Executing script " + rs.getString(3)); + if (log.isLoggable(Level.INFO)) log.info("Executing script " + rs.getString(3)); execOk = executeScript(tmpSql.toString(), rs.getString(3)); System.out.println(); } diff --git a/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java b/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java index 18d9127d60..c717e462e8 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java @@ -97,7 +97,7 @@ public class ClientAcctProcessor extends SvrProcess protected String doIt () throws Exception { StringBuilder msglog = new StringBuilder("C_AcctSchema_ID=").append(p_C_AcctSchema_ID).append(", AD_Table_ID=").append(p_AD_Table_ID); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); if (! MClient.isClientAccounting()) throw new AdempiereUserError(Msg.getMsg(getCtx(), "ClientAccountingNotEnabled")); diff --git a/org.adempiere.base.process/src/org/adempiere/process/Export.java b/org.adempiere.base.process/src/org/adempiere/process/Export.java index 52d08d76bc..5f366a04c3 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/Export.java +++ b/org.adempiere.base.process/src/org/adempiere/process/Export.java @@ -121,7 +121,7 @@ public class Export extends SvrProcess // m_dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, Env.getLanguage(getCtx())); // m_dateFormat = DisplayType.getDateFormat(DisplayType.Date, Env.getLanguage(getCtx())); // - log.info(sb.toString()); + if (log.isLoggable(Level.INFO)) log.info(sb.toString()); } // create new Document @@ -141,12 +141,12 @@ public class Export extends SvrProcess outDocument = createNewDocument(); MClient client = MClient.get (getCtx(), p_AD_Client_ID); - log.info(client.toString()); + if (log.isLoggable(Level.INFO)) log.info(client.toString()); // TODO - get proper Export Format! int EXP_Format_ID = 1000000; MTable table = MTable.get(getCtx(), AD_Table_ID); - log.info("Table = " + table); + if (log.isLoggable(Level.INFO)) log.info("Table = " + table); PO po = table.getPO (p_Record_ID, get_TrxName()); if (po.get_KeyColumns().length > 1 || po.get_KeyColumns().length < 1) { @@ -268,7 +268,7 @@ public class Export extends SvrProcess } }*/ StringBuilder msglog = new StringBuilder("EXP Field - column=[").append(column.getColumnName()).append("]; value=").append(value); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); if (valueString != null && !"".equals(valueString) && !"null".equals(valueString)) { Text newText = outDocument.createTextNode(valueString); newElement.appendChild(newText); @@ -330,7 +330,7 @@ public class Export extends SvrProcess } }*/ StringBuilder msglog = new StringBuilder("EXP Field - column=[").append(column.getColumnName()).append("]; value=").append(value); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); if (valueString != null && !"".equals(valueString) && !"null".equals(valueString)) { rootElement.setAttribute(formatLine.getValue(), valueString); elementHasValue = true; @@ -346,7 +346,7 @@ public class Export extends SvrProcess MEXPFormat embeddedFormat = new MEXPFormat(getCtx(), embeddedFormat_ID, get_TrxName()); MTable tableEmbedded = MTable.get(getCtx(), embeddedFormat.getAD_Table_ID()); - log.info("Table Embedded = " + tableEmbedded); + if (log.isLoggable(Level.INFO)) log.info("Table Embedded = " + tableEmbedded); StringBuilder sql = new StringBuilder("SELECT * ") .append("FROM ").append(tableEmbedded.getTableName()).append(" ") .append("WHERE ").append(masterPO.get_KeyColumns()[0]).append("=?") diff --git a/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java b/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java index 58e865804b..fcf56da70d 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ImmediateBankTransfer.java @@ -118,7 +118,7 @@ public class ImmediateBankTransfer extends SvrProcess .append(" - C_CashBook_ID=").append(p_C_CashBook_ID).append(" - Amount=").append(p_Amount).append(" - Name=").append(p_Name) .append(" - Description=").append(p_Description).append(" - Statement Date=").append(p_StatementDate) .append(" - Date Account=").append(p_DateAcct); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); if (p_To_C_BankAccount_ID == 0 || p_From_C_BankAccount_ID == 0) throw new IllegalArgumentException("Banks required"); diff --git a/org.adempiere.base.process/src/org/adempiere/process/ImportPriceList.java b/org.adempiere.base.process/src/org/adempiere/process/ImportPriceList.java index 7b21482a91..eaa1984264 100755 --- a/org.adempiere.base.process/src/org/adempiere/process/ImportPriceList.java +++ b/org.adempiere.base.process/src/org/adempiere/process/ImportPriceList.java @@ -106,7 +106,7 @@ public class ImportPriceList extends SvrProcess sql = new StringBuilder("DELETE I_PriceList " + "WHERE I_IsImported='Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Delete Old Impored =" + no); + if (log.isLoggable(Level.INFO)) log.info("Delete Old Impored =" + no); } // Set Client, Org, IsActive, Created/Updated, EnforcePriceLimit, IsSOPriceList, IsTaxIncluded, PricePrecision @@ -126,7 +126,7 @@ public class ImportPriceList extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info("Reset=" + no); // Set Optional BPartner sql = new StringBuilder ("UPDATE I_PriceList ") @@ -135,7 +135,7 @@ public class ImportPriceList extends SvrProcess .append("WHERE C_BPartner_ID IS NULL AND BPartner_Value IS NOT NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("BPartner=" + no); + if (log.isLoggable(Level.INFO)) log.info("BPartner=" + no); // sql = new StringBuilder ("UPDATE I_PriceList ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid BPartner,' ") @@ -169,7 +169,7 @@ public class ImportPriceList extends SvrProcess .append("WHERE M_PriceList_ID IS NULL") .append(" AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Price List Existing Value=" + no); + if (log.isLoggable(Level.INFO)) log.info("Price List Existing Value=" + no); // **** Find Price List Version // List Name (ID) + ValidFrom @@ -179,7 +179,7 @@ public class ImportPriceList extends SvrProcess .append("WHERE M_PriceList_ID IS NOT NULL AND M_PriceList_Version_ID IS NULL") .append(" AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Price List Version Existing Value=" + no); + if (log.isLoggable(Level.INFO)) log.info("Price List Version Existing Value=" + no); /* UOM For Future USE // Set UOM (System/own) @@ -224,7 +224,7 @@ public class ImportPriceList extends SvrProcess .append("WHERE C_Currency_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("doIt- Set Currency=" + no); + if (log.isLoggable(Level.INFO)) log.info("doIt- Set Currency=" + no); // sql = new StringBuilder ("UPDATE I_PriceList ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Currency,' ") diff --git a/org.adempiere.base.process/src/org/adempiere/process/InitialClientSetup.java b/org.adempiere.base.process/src/org/adempiere/process/InitialClientSetup.java index bcc9c14e46..5b7e1d280a 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/InitialClientSetup.java +++ b/org.adempiere.base.process/src/org/adempiere/process/InitialClientSetup.java @@ -168,7 +168,7 @@ public class InitialClientSetup extends SvrProcess .append(", IsUseSalesRegionDimension=").append(p_IsUseSalesRegionDimension) .append(", CoAFile=").append(p_CoAFile); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); // Validations @@ -199,7 +199,7 @@ public class InitialClientSetup extends SvrProcess MCity city = MCity.get(getCtx(), p_C_City_ID); if (! city.getName().equals(p_CityName)) { msglog = new StringBuilder("City name changed from ").append(p_CityName).append(" to ").append(city.getName()); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); p_CityName = city.getName(); } } diff --git a/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java b/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java index be2895227b..7b8a3ab1f9 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java +++ b/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java @@ -73,7 +73,7 @@ public class PrepareMigrationScripts extends SvrProcess { dirList = dir.listFiles(filter); StringBuilder msglog = new StringBuilder("Searching for SQL files in the ").append(dir).append(" directory"); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); StringBuilder msg = new StringBuilder(); diff --git a/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java b/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java index b12b9125ca..1880d23d42 100644 --- a/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java +++ b/org.adempiere.base.process/src/org/compiere/install/LanguageMaintenance.java @@ -73,7 +73,7 @@ public class LanguageMaintenance extends SvrProcess protected String doIt() throws Exception { m_language = new MLanguage (getCtx(), p_AD_Language_ID, get_TrxName()); - log.info("Mode=" + p_MaintenanceMode + ", ID=" + p_AD_Language_ID + if (log.isLoggable(Level.INFO)) log.info("Mode=" + p_MaintenanceMode + ", ID=" + p_AD_Language_ID + " - " + m_language); if (m_language.isBaseLanguage()) diff --git a/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java b/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java index ef4a07bd8b..66f3b2f086 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java +++ b/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java @@ -78,7 +78,7 @@ public class AD_PrintPaper_Default extends SvrProcess sql.append(" AND AD_Client_ID = ").append(p_AD_Client_ID); } cnt = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Updated " + cnt + " columns"); + if (log.isLoggable(Level.INFO)) log.info("Updated " + cnt + " columns"); log.fine("Committing ..."); DB.commit(true, null); } diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java index 516a8d853d..96d595f3ac 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java +++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaCopyAcct.java @@ -65,7 +65,7 @@ public class AcctSchemaCopyAcct extends SvrProcess */ protected String doIt () throws Exception { - log.info("SourceAcctSchema_ID=" + p_SourceAcctSchema_ID + if (log.isLoggable(Level.INFO)) log.info("SourceAcctSchema_ID=" + p_SourceAcctSchema_ID + ", TargetAcctSchema_ID=" + p_TargetAcctSchema_ID); if (p_SourceAcctSchema_ID == 0 || p_TargetAcctSchema_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java index 90a8ad565c..73d4c234b4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java @@ -65,7 +65,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID + if (log.isLoggable(Level.INFO)) log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID + ", CopyOverwriteAcct=" + p_CopyOverwriteAcct); if (p_C_AcctSchema_ID == 0) throw new AdempiereSystemError("C_AcctSchema_ID=0"); diff --git a/org.adempiere.base.process/src/org/compiere/process/Aging.java b/org.adempiere.base.process/src/org/compiere/process/Aging.java index 270fea7343..a640d1a704 100644 --- a/org.adempiere.base.process/src/org/compiere/process/Aging.java +++ b/org.adempiere.base.process/src/org/compiere/process/Aging.java @@ -98,7 +98,7 @@ public class Aging extends SvrProcess */ protected String doIt() throws Exception { - log.info("StatementDate=" + p_StatementDate + ", IsSOTrx=" + p_IsSOTrx + if (log.isLoggable(Level.INFO)) log.info("StatementDate=" + p_StatementDate + ", IsSOTrx=" + p_IsSOTrx + ", C_Currency_ID=" + p_C_Currency_ID + ", AD_Org_ID=" + p_AD_Org_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + ", IsListInvoices=" + p_IsListInvoices); @@ -252,7 +252,7 @@ public class Aging extends SvrProcess rs = null; pstmt = null; } // - log.info("#" + counter + " - rows=" + rows); + if (log.isLoggable(Level.INFO)) log.info("#" + counter + " - rows=" + rows); return ""; } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java b/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java index 416c9c5e56..a6317bf9a5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java +++ b/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java @@ -94,7 +94,7 @@ public class AllocationAuto extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID + if (log.isLoggable(Level.INFO)) log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + ", Oldest=" + p_AllocateOldest + ", AP/AR=" + p_APAR); @@ -184,7 +184,7 @@ public class AllocationAuto extends SvrProcess { getPayments(C_BPartner_ID); getInvoices(C_BPartner_ID); - log.info ("(1) - C_BPartner_ID=" + C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info ("(1) - C_BPartner_ID=" + C_BPartner_ID + " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length); if (m_payments.length + m_invoices.length < 2) return 0; @@ -195,7 +195,7 @@ public class AllocationAuto extends SvrProcess { getPayments(C_BPartner_ID); // for next getInvoices(C_BPartner_ID); - log.info ("(2) - C_BPartner_ID=" + C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info ("(2) - C_BPartner_ID=" + C_BPartner_ID + " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length); if (m_payments.length + m_invoices.length < 2) return count; @@ -209,7 +209,7 @@ public class AllocationAuto extends SvrProcess getPayments(C_BPartner_ID); // for next getInvoices(C_BPartner_ID); processAllocation(); - log.info ("(3) - C_BPartner_ID=" + C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info ("(3) - C_BPartner_ID=" + C_BPartner_ID + " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length); if (m_payments.length + m_invoices.length < 2) return count; @@ -223,7 +223,7 @@ public class AllocationAuto extends SvrProcess getPayments(C_BPartner_ID); // for next getInvoices(C_BPartner_ID); processAllocation(); - log.info ("(4) - C_BPartner_ID=" + C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info ("(4) - C_BPartner_ID=" + C_BPartner_ID + " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length); if (m_payments.length + m_invoices.length < 2) return count; @@ -239,7 +239,7 @@ public class AllocationAuto extends SvrProcess getPayments(C_BPartner_ID); // for next getInvoices(C_BPartner_ID); processAllocation(); - log.info ("(5) - C_BPartner_ID=" + C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info ("(5) - C_BPartner_ID=" + C_BPartner_ID + " - #Payments=" + m_payments.length + ", #Invoices=" + m_invoices.length); if (m_payments.length + m_invoices.length < 2) return count; @@ -366,7 +366,7 @@ public class AllocationAuto extends SvrProcess if (payment.isAllocated()) continue; BigDecimal allocatedAmt = payment.getAllocatedAmt(); - log.info(payment + ", Allocated=" + allocatedAmt); + if (log.isLoggable(Level.INFO)) log.info(payment + ", Allocated=" + allocatedAmt); if (allocatedAmt != null && allocatedAmt.signum() != 0) continue; BigDecimal availableAmt = payment.getPayAmt() @@ -469,7 +469,7 @@ public class AllocationAuto extends SvrProcess if (payment.isAllocated()) continue; BigDecimal allocatedAmt = payment.getAllocatedAmt(); - log.info(payment + ", Allocated=" + allocatedAmt); + if (log.isLoggable(Level.INFO)) log.info(payment + ", Allocated=" + allocatedAmt); if (allocatedAmt != null && allocatedAmt.signum() != 0) continue; BigDecimal availableAmt = payment.getPayAmt() @@ -574,7 +574,7 @@ public class AllocationAuto extends SvrProcess } BigDecimal difference = totalInvoices.subtract(totalPayments); - log.info("= Invoices=" + totalInvoices + if (log.isLoggable(Level.INFO)) log.info("= Invoices=" + totalInvoices + " - Payments=" + totalPayments + " = Difference=" + difference); @@ -649,7 +649,7 @@ public class AllocationAuto extends SvrProcess if (payment.getC_Currency_ID() != C_Currency_ID) continue; BigDecimal allocatedAmt = payment.getAllocatedAmt(); - log.info(payment + ", Allocated=" + allocatedAmt); + if (log.isLoggable(Level.INFO)) log.info(payment + ", Allocated=" + allocatedAmt); BigDecimal availableAmt = payment.getPayAmt() .add(payment.getDiscountAmt()) .add(payment.getWriteOffAmt()) @@ -694,7 +694,7 @@ public class AllocationAuto extends SvrProcess BigDecimal maxAmt = totalInvoices.abs().min(totalPayments.abs()); if (totalInvoices.signum() < 0) maxAmt = maxAmt.negate(); - log.info("= Invoices=" + totalInvoices + if (log.isLoggable(Level.INFO)) log.info("= Invoices=" + totalInvoices + " - Payments=" + totalPayments + " = Difference=" + difference + " - Max=" + maxAmt); diff --git a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java index 251ca03df1..a93b20a2b6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java +++ b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java @@ -94,7 +94,7 @@ public class AllocationReset extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info ("C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + ", DateAcct= " + p_DateAcct_From + " - " + p_DateAcct_To + ", C_AllocationHdr_ID=" + p_C_AllocationHdr_ID + ", AllAllocations=" + p_AllAllocations); diff --git a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java index 6eee91b0db..b386469777 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java +++ b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java @@ -179,7 +179,7 @@ public class AssetDelivery extends SvrProcess rs = null; stmt = null; } - log.info("Count=" + count + ", Errors=" + errors + ", Reminder=" + reminders + if (log.isLoggable(Level.INFO)) log.info("Count=" + count + ", Errors=" + errors + ", Reminder=" + reminders + " - " + (System.currentTimeMillis()-start) + "ms"); StringBuilder msgreturn = new StringBuilder("@Sent@=").append(count).append(" - @Errors@=").append(errors); return msgreturn.toString(); diff --git a/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java b/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java index 5170e31655..7d6cbfac4b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/BOMValidate.java @@ -78,10 +78,10 @@ public class BOMValidate extends SvrProcess { if (p_M_Product_ID != 0) { - log.info("M_Product_ID=" + p_M_Product_ID); + if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + p_M_Product_ID); return validateProduct(new MProduct(getCtx(), p_M_Product_ID, get_TrxName())); } - log.info("M_Product_Category_ID=" + p_M_Product_Category_ID + if (log.isLoggable(Level.INFO)) log.info("M_Product_Category_ID=" + p_M_Product_Category_ID + ", IsReValidate=" + p_IsReValidate); // int counter = 0; diff --git a/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java b/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java index a8e957bd05..68311bc292 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java +++ b/org.adempiere.base.process/src/org/compiere/process/BOMVerify.java @@ -79,11 +79,11 @@ public class BOMVerify extends SvrProcess { if (p_M_Product_ID != 0) { - log.info("M_Product_ID=" + p_M_Product_ID); + if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + p_M_Product_ID); checkProduct(new MProduct(getCtx(), p_M_Product_ID, get_TrxName())); return "Product Checked"; } - log.info("M_Product_Category_ID=" + p_M_Product_Category_ID + if (log.isLoggable(Level.INFO)) log.info("M_Product_Category_ID=" + p_M_Product_Category_ID + ", IsReValidate=" + p_IsReValidate); // int counter = 0; diff --git a/org.adempiere.base.process/src/org/compiere/process/BPGroupAcctCopy.java b/org.adempiere.base.process/src/org/compiere/process/BPGroupAcctCopy.java index 0a34f379dd..ab5cef84f5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BPGroupAcctCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/BPGroupAcctCopy.java @@ -65,7 +65,7 @@ public class BPGroupAcctCopy extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID); + if (log.isLoggable(Level.INFO)) log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID); if (p_C_AcctSchema_ID == 0) throw new AdempiereSystemError("C_AcctSchema_ID=0"); MAcctSchema as = MAcctSchema.get(getCtx(), p_C_AcctSchema_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java b/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java index c234415b6f..b9e59240f5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java +++ b/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java @@ -77,7 +77,7 @@ public class BPartnerOrgLink extends SvrProcess */ protected String doIt() throws Exception { - log.info("C_BPartner_ID=" + p_C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", AD_Org_ID=" + p_AD_Org_ID + ", AD_OrgType_ID=" + p_AD_OrgType_ID + ", AD_Role_ID=" + p_AD_Role_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgUnLink.java b/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgUnLink.java index 0a5f42dcca..16170b9fc0 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgUnLink.java +++ b/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgUnLink.java @@ -57,7 +57,7 @@ public class BPartnerOrgUnLink extends SvrProcess */ protected String doIt() throws Exception { - log.info("doIt - C_BPartner_ID=" + p_C_BPartner_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - C_BPartner_ID=" + p_C_BPartner_ID); if (p_C_BPartner_ID == 0) throw new IllegalArgumentException ("No Business Partner ID"); MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java b/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java index e8c6fc91b8..67b7b2b71b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java @@ -72,7 +72,7 @@ public class BPartnerValidate extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID); + if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID); if (p_C_BPartner_ID == 0 && p_C_BP_Group_ID == 0) throw new AdempiereUserError ("No Business Partner/Group selected"); diff --git a/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java b/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java index 5efe1baf32..ae72cbff3c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java +++ b/org.adempiere.base.process/src/org/compiere/process/BankStatementMatcher.java @@ -65,7 +65,7 @@ public class BankStatementMatcher extends SvrProcess if (m_matchers == null || m_matchers.length == 0) throw new IllegalStateException("No Matchers found"); // - log.info ("doIt - Table_ID=" + Table_ID + ", Record_ID=" + Record_ID + if (log.isLoggable(Level.INFO)) log.info ("doIt - Table_ID=" + Table_ID + ", Record_ID=" + Record_ID + ", Matchers=" + m_matchers.length); if (Table_ID == X_I_BankStatement.Table_ID) diff --git a/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java b/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java index 2309f053fa..6b7a3243c1 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java +++ b/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java @@ -63,7 +63,7 @@ public class BankStatementPayment extends SvrProcess { int Table_ID = getTable_ID(); int Record_ID = getRecord_ID(); - log.info ("Table_ID=" + Table_ID + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.INFO)) log.info ("Table_ID=" + Table_ID + ", Record_ID=" + Record_ID); if (Table_ID == X_I_BankStatement.Table_ID) return createPayment (new X_I_BankStatement(getCtx(), Record_ID, get_TrxName())); diff --git a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java index fe5443c3c0..f531ff3417 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java @@ -113,7 +113,7 @@ public class ChangeLogProcess extends SvrProcess if (p_SetCustomization) return setCustomization(); - log.info("AD_ChangeLog_ID=" + p_AD_ChangeLog_ID + if (log.isLoggable(Level.INFO)) log.info("AD_ChangeLog_ID=" + p_AD_ChangeLog_ID + ", CheckOldValue=" + p_CheckOldValue + ", CheckNewValue=" + p_CheckNewValue); // Single Change or All Customizations @@ -306,7 +306,7 @@ public class ChangeLogProcess extends SvrProcess if (m_isInsert && m_numberColumns > 2) { m_sqlInsert.append(m_sqlInsertValue).append(")"); - log.info(m_sqlInsert.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_sqlInsert.toString()); // no = DB.executeUpdate(m_sqlInsert.toString(), get_TrxName()); if (no == -1) @@ -325,7 +325,7 @@ public class ChangeLogProcess extends SvrProcess else // Update SQL { m_sqlUpdate.append(m_sqlUpdateWhere); - log.info(m_sqlUpdate.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_sqlUpdate.toString()); // no = DB.executeUpdate(m_sqlUpdate.toString(), get_TrxName()); if (no == -1) diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java b/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java index 27f5ca8ecb..7e54fca391 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java +++ b/org.adempiere.base.process/src/org/compiere/process/ColumnSync.java @@ -68,7 +68,7 @@ public class ColumnSync extends SvrProcess */ protected String doIt() throws Exception { - log.info("C_Column_ID=" + p_AD_Column_ID); + if (log.isLoggable(Level.INFO)) log.info("C_Column_ID=" + p_AD_Column_ID); if (p_AD_Column_ID == 0) throw new AdempiereUserError("@No@ @AD_Column_ID@"); MColumn column = new MColumn (getCtx(), p_AD_Column_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java b/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java index bc416bb557..493fb8780b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java @@ -58,7 +58,7 @@ public class CommissionAPInvoice extends SvrProcess */ protected String doIt() throws Exception { - log.info("doIt - C_CommissionRun_ID=" + getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info("doIt - C_CommissionRun_ID=" + getRecord_ID()); // Load Data MCommissionRun comRun = new MCommissionRun (getCtx(), getRecord_ID(), get_TrxName()); if (comRun.get_ID() == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java index 6f5aca576c..3b945457d5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java +++ b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java @@ -76,7 +76,7 @@ public class CommissionCalc extends SvrProcess */ protected String doIt() throws Exception { - log.info("C_Commission_ID=" + getRecord_ID() + ", StartDate=" + p_StartDate); + if (log.isLoggable(Level.INFO)) log.info("C_Commission_ID=" + getRecord_ID() + ", StartDate=" + p_StartDate); if (p_StartDate == null) p_StartDate = new Timestamp (System.currentTimeMillis()); m_com = new MCommission (getCtx(), getRecord_ID(), get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionCopy.java b/org.adempiere.base.process/src/org/compiere/process/CommissionCopy.java index 9b300fd832..99793dc0fd 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CommissionCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/CommissionCopy.java @@ -61,7 +61,7 @@ public class CommissionCopy extends SvrProcess */ protected String doIt () throws Exception { - log.info("doIt - C_Commission_ID=" + p_C_Commission_ID + " - copy to " + p_C_CommissionTo_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - C_Commission_ID=" + p_C_Commission_ID + " - copy to " + p_C_CommissionTo_ID); MCommission comFrom = new MCommission (getCtx(), p_C_Commission_ID, get_TrxName()); if (comFrom.get_ID() == 0) throw new AdempiereUserError ("No From Commission"); diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java b/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java index e781465781..513b7e0dff 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java @@ -70,7 +70,7 @@ public class CopyColumnsFromTable extends SvrProcess throw new AdempiereSystemError("@NotFound@ @AD_Table_ID@ " + p_target_AD_Table_ID); if (p_source_AD_Table_ID == 0) throw new AdempiereSystemError("@NotFound@ @AD_Table_ID@ " + p_source_AD_Table_ID); - log.info("Source AD_Table_ID=" + p_source_AD_Table_ID + if (log.isLoggable(Level.INFO)) log.info("Source AD_Table_ID=" + p_source_AD_Table_ID + ", Target AD_Table_ID=" + p_target_AD_Table_ID); MTable targetTable = new MTable(getCtx(), p_target_AD_Table_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyFromBankStmt.java b/org.adempiere.base.process/src/org/compiere/process/CopyFromBankStmt.java index a117bd8214..4bdd140712 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyFromBankStmt.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyFromBankStmt.java @@ -61,7 +61,7 @@ public class CopyFromBankStmt extends SvrProcess protected String doIt() throws Exception { int To_C_BankStatement_ID = getRecord_ID(); - log.info("From C_BankStatement_ID=" + m_C_BankStatement_ID + " to " + To_C_BankStatement_ID); + if (log.isLoggable(Level.INFO)) log.info("From C_BankStatement_ID=" + m_C_BankStatement_ID + " to " + To_C_BankStatement_ID); if (To_C_BankStatement_ID == 0) throw new IllegalArgumentException("Target C_BankStatement_ID == 0"); if (m_C_BankStatement_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyFromInvoice.java b/org.adempiere.base.process/src/org/compiere/process/CopyFromInvoice.java index c8d811ac8e..8749ef9ec7 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyFromInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyFromInvoice.java @@ -57,7 +57,7 @@ public class CopyFromInvoice extends SvrProcess protected String doIt() throws Exception { int To_C_Invoice_ID = getRecord_ID(); - log.info("From C_Invoice_ID=" + m_C_Invoice_ID + " to " + To_C_Invoice_ID); + if (log.isLoggable(Level.INFO)) log.info("From C_Invoice_ID=" + m_C_Invoice_ID + " to " + To_C_Invoice_ID); if (To_C_Invoice_ID == 0) throw new IllegalArgumentException("Target C_Invoice_ID == 0"); if (m_C_Invoice_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyFromJournal.java b/org.adempiere.base.process/src/org/compiere/process/CopyFromJournal.java index 6bfd5fa6e0..5ffb01a04d 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyFromJournal.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyFromJournal.java @@ -58,7 +58,7 @@ public class CopyFromJournal extends SvrProcess protected String doIt() throws Exception { int To_GL_JournalBatch_ID = getRecord_ID(); - log.info("doIt - From GL_JournalBatch_ID=" + m_GL_JournalBatch_ID + " to " + To_GL_JournalBatch_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - From GL_JournalBatch_ID=" + m_GL_JournalBatch_ID + " to " + To_GL_JournalBatch_ID); if (To_GL_JournalBatch_ID == 0) throw new IllegalArgumentException("Target GL_JournalBatch_ID == 0"); if (m_GL_JournalBatch_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyFromJournalDoc.java b/org.adempiere.base.process/src/org/compiere/process/CopyFromJournalDoc.java index 66e1758115..55007a1df6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyFromJournalDoc.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyFromJournalDoc.java @@ -54,7 +54,7 @@ public class CopyFromJournalDoc extends SvrProcess protected String doIt() throws Exception { int To_GL_Journal_ID = getRecord_ID(); - log.info("doIt - From GL_Journal_ID=" + m_GL_Journal_ID + " to " + To_GL_Journal_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - From GL_Journal_ID=" + m_GL_Journal_ID + " to " + To_GL_Journal_ID); if (To_GL_Journal_ID == 0) throw new IllegalArgumentException("Target GL_Journal_ID == 0"); if (m_GL_Journal_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyFromOrder.java b/org.adempiere.base.process/src/org/compiere/process/CopyFromOrder.java index 9c9758cdc9..57704b7580 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyFromOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyFromOrder.java @@ -58,7 +58,7 @@ public class CopyFromOrder extends SvrProcess protected String doIt() throws Exception { int To_C_Order_ID = getRecord_ID(); - log.info("From C_Order_ID=" + p_C_Order_ID + " to " + To_C_Order_ID); + if (log.isLoggable(Level.INFO)) log.info("From C_Order_ID=" + p_C_Order_ID + " to " + To_C_Order_ID); if (To_C_Order_ID == 0) throw new IllegalArgumentException("Target C_Order_ID == 0"); if (p_C_Order_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyFromProject.java b/org.adempiere.base.process/src/org/compiere/process/CopyFromProject.java index 50cc61efa5..af7bcec958 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyFromProject.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyFromProject.java @@ -57,7 +57,7 @@ public class CopyFromProject extends SvrProcess protected String doIt() throws Exception { int To_C_Project_ID = getRecord_ID(); - log.info("doIt - From C_Project_ID=" + m_C_Project_ID + " to " + To_C_Project_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - From C_Project_ID=" + m_C_Project_ID + " to " + To_C_Project_ID); if (To_C_Project_ID == 0) throw new IllegalArgumentException("Target C_Project_ID == 0"); if (m_C_Project_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java index 6618d606ed..e00d31ed50 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java @@ -71,7 +71,7 @@ public class CopyOrder extends SvrProcess */ protected String doIt() throws Exception { - log.info("C_Order_ID=" + p_C_Order_ID + if (log.isLoggable(Level.INFO)) log.info("C_Order_ID=" + p_C_Order_ID + ", C_DocType_ID=" + p_C_DocType_ID + ", CloseDocument=" + p_IsCloseDocument); if (p_C_Order_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java b/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java index 807b8fdab8..a96431ce8e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java @@ -47,7 +47,7 @@ public class CopyProduct extends SvrProcess { protected String doIt() throws Exception { int toMProductID = getRecord_ID(); - log.info("From M_Product_ID=" + m_copyFromId + " to " + toMProductID); + if (log.isLoggable(Level.INFO)) log.info("From M_Product_ID=" + m_copyFromId + " to " + toMProductID); if (toMProductID == 0) throw new IllegalArgumentException("Target M_Product_ID == 0"); if (m_copyFromId == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CostCreate.java b/org.adempiere.base.process/src/org/compiere/process/CostCreate.java index 058491092a..a95b5cfbff 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CostCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/CostCreate.java @@ -59,7 +59,7 @@ public class CostCreate extends SvrProcess */ protected String doIt() throws Exception { - log.info("M_Product_ID=" + p_M_Product_ID); + if (log.isLoggable(Level.INFO)) log.info("M_Product_ID=" + p_M_Product_ID); if (p_M_Product_ID == 0) throw new AdempiereUserError("@NotFound@: @M_Product_ID@ = " + p_M_Product_ID); MProduct product = MProduct.get(getCtx(), p_M_Product_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java index 3121158a63..32208e3862 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java +++ b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java @@ -101,7 +101,7 @@ public class CostUpdate extends SvrProcess */ protected String doIt() throws Exception { - log.info("M_Product_Category_ID=" + p_M_Product_Category_ID + if (log.isLoggable(Level.INFO)) log.info("M_Product_Category_ID=" + p_M_Product_Category_ID + ", Future=" + p_SetFutureCostTo + ", Standard=" + p_SetStandardCostTo + "; M_PriceList_Version_ID=" + p_M_PriceList_Version_ID); @@ -220,7 +220,7 @@ public class CostUpdate extends SvrProcess rs = null; pstmt = null; } - log.info("#" + counter); + if (log.isLoggable(Level.INFO)) log.info("#" + counter); addLog(0, null, new BigDecimal(counter), "Created for " + as.getName()); } // createNew @@ -283,7 +283,7 @@ public class CostUpdate extends SvrProcess rs = null; pstmt = null; } - log.info("#" + counter); + if (log.isLoggable(Level.INFO)) log.info("#" + counter); addLog(0, null, new BigDecimal(counter), "@Updated@"); return counter; } // update diff --git a/org.adempiere.base.process/src/org/compiere/process/DiscountSchemaReSeq.java b/org.adempiere.base.process/src/org/compiere/process/DiscountSchemaReSeq.java index e50c319ca9..e1a8371466 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DiscountSchemaReSeq.java +++ b/org.adempiere.base.process/src/org/compiere/process/DiscountSchemaReSeq.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MDiscountSchema; import org.compiere.util.AdempiereUserError; @@ -46,7 +48,7 @@ public class DiscountSchemaReSeq extends SvrProcess */ protected String doIt () throws Exception { - log.info("M_DiscountSchema_ID=" + p_M_DiscountSchema_ID); + if (log.isLoggable(Level.INFO)) log.info("M_DiscountSchema_ID=" + p_M_DiscountSchema_ID); if (p_M_DiscountSchema_ID == 0) throw new AdempiereUserError("@M_DiscountSchema_ID@ = 0"); MDiscountSchema ds = new MDiscountSchema(getCtx(), p_M_DiscountSchema_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java index a12321a18d..dbc8cd4b84 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java @@ -99,11 +99,11 @@ public class DistributionCreate extends SvrProcess */ protected String doIt() throws Exception { - log.info("M_DistributionList_ID=" + p_M_DistributionList_ID + if (log.isLoggable(Level.INFO)) log.info("M_DistributionList_ID=" + p_M_DistributionList_ID + ", M_Product_ID=" + p_M_Product_ID + ", Qty=" + p_Qty + ", Test=" + p_IsTest); if (p_IsCreateSingleOrder) - log.info("SingleOrder=" + p_IsCreateSingleOrder + if (log.isLoggable(Level.INFO)) log.info("SingleOrder=" + p_IsCreateSingleOrder + ", BPartner_ID=" + p_Bill_BPartner_ID + ", Location_ID=" + p_Bill_Location_ID); // diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java index 491e1b91ba..5a60a72a1e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java @@ -135,7 +135,7 @@ public class DistributionRun extends SvrProcess */ protected String doIt() throws Exception { - log.info("M_DistributionRun_ID=" + p_M_DistributionRun_ID + if (log.isLoggable(Level.INFO)) log.info("M_DistributionRun_ID=" + p_M_DistributionRun_ID + ", C_DocType_ID=" + p_C_DocType_ID + ", DatePromised=" + p_DatePromised + ", Test=" + p_IsTest); @@ -331,7 +331,7 @@ public class DistributionRun extends SvrProcess if (allocationEqTotal && !runLine.isActualAllocationEqTotal()) allocationEqTotal = false; } // for all run lines - log.info("=" + allocationEqTotal); + if (log.isLoggable(Level.INFO)) log.info("=" + allocationEqTotal); return allocationEqTotal; } // isAllocationEqTotal @@ -446,9 +446,9 @@ public class DistributionRun extends SvrProcess if (!counter || runBPartner == null || runBPartner.get_ID() != runC_BPartner_ID) counter = false; if (counter) - log.info("RunBP=" + runBPartner + if (log.isLoggable(Level.INFO)) log.info("RunBP=" + runBPartner + " - " + m_docType); - log.info("Single=" + m_run.isCreateSingleOrder() + if (log.isLoggable(Level.INFO)) log.info("Single=" + m_run.isCreateSingleOrder() + " - " + m_docType + ",SO=" + m_docType.isSOTrx()); if (log.isLoggable(Level.FINE)) log.fine("Counter=" + counter + ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner); @@ -638,12 +638,14 @@ public class DistributionRun extends SvrProcess MProduct product = MProduct.get(getCtx(), record.getM_Product_ID()); BigDecimal ration = record.getRatio(); BigDecimal totalration = getQtyDemand(record.getM_Product_ID()); - log.info("Value:" + product.getValue()); - log.info("Product:" + product.getName()); - log.info("Qty To Deliver:" + record.getRatio()); - log.info("Qty Target:" + record.getMinQty()); - log.info("Qty Total Available:" + drl.getTotalQty()); - log.info("Qty Total Demand:" + totalration); + if (log.isLoggable(Level.INFO)){ + log.info("Value:" + product.getValue()); + log.info("Product:" + product.getName()); + log.info("Qty To Deliver:" + record.getRatio()); + log.info("Qty Target:" + record.getMinQty()); + log.info("Qty Total Available:" + drl.getTotalQty()); + log.info("Qty Total Demand:" + totalration); + } BigDecimal factor = ration.divide(totalration, 12 , BigDecimal.ROUND_HALF_UP); record.setQty(drl.getTotalQty().multiply(factor)); record.saveEx(); @@ -844,9 +846,9 @@ public class DistributionRun extends SvrProcess if (!counter || runBPartner == null || runBPartner.get_ID() != runC_BPartner_ID) counter = false; if (counter) - log.info("RunBP=" + runBPartner + if (log.isLoggable(Level.INFO)) log.info("RunBP=" + runBPartner + " - " + m_docType); - log.info("Single=" + m_run.isCreateSingleOrder() + if (log.isLoggable(Level.INFO)) log.info("Single=" + m_run.isCreateSingleOrder() + " - " + m_docType + ",SO=" + m_docType.isSOTrx()); if (log.isLoggable(Level.FINE)) log.fine("Counter=" + counter + ",C_BPartner_ID=" + runC_BPartner_ID + "," + runBPartner); diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionVerify.java b/org.adempiere.base.process/src/org/compiere/process/DistributionVerify.java index 09177bde36..2975e63781 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionVerify.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionVerify.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MDistribution; import org.compiere.util.AdempiereSystemError; import org.compiere.util.AdempiereUserError; @@ -44,7 +46,7 @@ public class DistributionVerify extends SvrProcess */ protected String doIt () throws Exception { - log.info("doIt - GL_Distribution_ID=" + getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info("doIt - GL_Distribution_ID=" + getRecord_ID()); MDistribution distribution = new MDistribution (getCtx(), getRecord_ID(), get_TrxName()); if (distribution.get_ID() == 0) throw new AdempiereUserError("Not found GL_Distribution_ID=" + getRecord_ID()); diff --git a/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java b/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java index 35d6a64f9f..7a2415aae4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DocTypeCounterValidate.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MDocTypeCounter; /** @@ -45,7 +47,7 @@ public class DocTypeCounterValidate extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_DocTypeCounter_ID=" + p_C_DocTypeCounter_ID); + if (log.isLoggable(Level.INFO)) log.info("C_DocTypeCounter_ID=" + p_C_DocTypeCounter_ID); m_counter = new MDocTypeCounter (getCtx(), p_C_DocTypeCounter_ID, get_TrxName()); if (m_counter == null || m_counter.get_ID() == 0) throw new IllegalArgumentException("Not found C_DocTypeCounter_ID=" + p_C_DocTypeCounter_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java index c3dbf29e9a..835bfddee6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java @@ -89,7 +89,7 @@ public class DunningPrint extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_DunningRun_ID=" + p_C_DunningRun_ID + ",R_MailText_ID=" + p_R_MailText_ID + if (log.isLoggable(Level.INFO)) log.info("C_DunningRun_ID=" + p_C_DunningRun_ID + ",R_MailText_ID=" + p_R_MailText_ID + ", EmailPDF=" + p_EMailPDF + ",IsOnlyIfBPBalance=" + p_IsOnlyIfBPBalance + ",PrintUnprocessedOnly=" + p_PrintUnprocessedOnly); diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java index 941f813f7f..3cd5aeb1c8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java @@ -95,7 +95,7 @@ public class DunningRunCreate extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_DunningRun_ID=" + p_C_DunningRun_ID + if (log.isLoggable(Level.INFO)) log.info("C_DunningRun_ID=" + p_C_DunningRun_ID + ", Dispute=" + p_IncludeInDispute + ", C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID); @@ -168,7 +168,7 @@ public class DunningRunCreate extends SvrProcess sql.append(" AND i.C_Currency_ID=").append(p_C_Currency_ID); if ( p_AD_Org_ID != 0 ) sql.append(" AND i.AD_Org_ID=").append(p_AD_Org_ID); - // log.info(sql); + // if (log.isLoggable(Level.INFO)) log.info(sql); String sql2= ""; diff --git a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java index f62b97ad58..efe4fd2e88 100644 --- a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java +++ b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java @@ -17,6 +17,7 @@ package org.compiere.process; import java.io.File; +import java.util.logging.Level; import org.compiere.model.MClient; import org.compiere.model.MStore; @@ -51,7 +52,7 @@ public class EMailTest extends SvrProcess protected String doIt () throws Exception { MClient client = MClient.get (getCtx(), p_AD_Client_ID); - log.info(client.toString()); + if (log.isLoggable(Level.INFO)) log.info(client.toString()); // Test Client Mail String clientTest = client.testEMail(); diff --git a/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java b/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java index c39c4d2e79..888e36f1f2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java +++ b/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MEntityType; import org.compiere.util.AdempiereSystemError; import org.compiere.util.AdempiereUserError; @@ -47,7 +49,7 @@ public class EntityTypeRegister extends SvrProcess protected String doIt () throws Exception { - log.info("AD_EntityType_ID=" + p_AD_EntityType_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_EntityType_ID=" + p_AD_EntityType_ID); MEntityType et = new MEntityType(getCtx(), p_AD_EntityType_ID, get_TrxName()); if (et.isSystemMaintained()) throw new AdempiereUserError("You cannot register a System maintained entity"); diff --git a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java index 0f642e7d99..e64761bccc 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java @@ -119,7 +119,7 @@ public class ExpenseAPInvoice extends SvrProcess completeInvoice (invoice); MBPartner bp = new MBPartner (getCtx(), te.getC_BPartner_ID(), get_TrxName()); // - log.info("New Invoice for " + bp); + if (log.isLoggable(Level.INFO)) log.info("New Invoice for " + bp); invoice = new MInvoice (getCtx(), 0, null); invoice.setClientOrg(te.getAD_Client_ID(), te.getAD_Org_ID()); invoice.setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_APInvoice); // API diff --git a/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java b/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java index ecfd550611..f4975736d6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java @@ -172,7 +172,7 @@ public class ExpenseSOrder extends SvrProcess { if (m_order == null) { - log.info("New Order for " + bp + ", Project=" + tel.getC_Project_ID()); + if (log.isLoggable(Level.INFO)) log.info("New Order for " + bp + ", Project=" + tel.getC_Project_ID()); m_order = new MOrder (getCtx(), 0, get_TrxName()); m_order.setAD_Org_ID(tel.getAD_Org_ID()); m_order.setC_DocTypeTarget_ID(MOrder.DocSubTypeSO_OnCredit); diff --git a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java index ebf991ac0a..2995f6358c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java +++ b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java @@ -101,7 +101,7 @@ public class FactAcctReset extends SvrProcess */ protected String doIt() throws Exception { - log.info("AD_Client_ID=" + p_AD_Client_ID + if (log.isLoggable(Level.INFO)) log.info("AD_Client_ID=" + p_AD_Client_ID + ", AD_Table_ID=" + p_AD_Table_ID + ", DeletePosting=" + p_DeletePosting); // List of Tables with Accounting Consequences String sql = "SELECT AD_Table_ID, TableName " @@ -178,12 +178,12 @@ public class FactAcctReset extends SvrProcess Timestamp temp = TimeUtil.addDays(today, - as.getPeriod_OpenHistory()); if ( p_DateAcct_From == null || p_DateAcct_From.before(temp) ) { p_DateAcct_From = temp; - log.info("DateAcct From set to: " + p_DateAcct_From); + if (log.isLoggable(Level.INFO)) log.info("DateAcct From set to: " + p_DateAcct_From); } temp = TimeUtil.addDays(today, as.getPeriod_OpenFuture()); if ( p_DateAcct_To == null || p_DateAcct_To.after(temp) ) { p_DateAcct_To = temp; - log.info("DateAcct To set to: " + p_DateAcct_To); + if (log.isLoggable(Level.INFO)) log.info("DateAcct To set to: " + p_DateAcct_To); } } @@ -292,7 +292,7 @@ public class FactAcctReset extends SvrProcess int deleted = DB.executeUpdate(sql2, get_TrxName()); // - log.info(TableName + "(" + AD_Table_ID + ") - Reset=" + reset + " - Deleted=" + deleted); + if (log.isLoggable(Level.INFO)) log.info(TableName + "(" + AD_Table_ID + ") - Reset=" + reset + " - Deleted=" + deleted); String s = TableName + " - Reset=" + reset + " - Deleted=" + deleted; addLog(s); // diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java index 73f6c8d2be..46d8023ea7 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java @@ -395,7 +395,7 @@ public class ImportAccount extends SvrProcess no = 0; } if (no == 0) - log.info("Parent not found for " + rs.getString(5)); + if (log.isLoggable(Level.INFO)) log.info("Parent not found for " + rs.getString(5)); } } catch (SQLException e) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java index f1cb138af7..a160cd5488 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java @@ -83,7 +83,7 @@ public class ImportBankStatement extends SvrProcess protected String doIt() throws java.lang.Exception { StringBuilder msglog = new StringBuilder("AD_Org_ID=").append(p_AD_Org_ID).append(", C_BankAccount_ID").append(p_C_BankAccount_ID); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); StringBuilder sql = null; int no = 0; StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(p_AD_Client_ID); @@ -112,7 +112,7 @@ public class ImportBankStatement extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL OR AD_Client_ID IS NULL OR AD_Org_ID IS NULL OR AD_Client_ID=0 OR AD_Org_ID=0"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); sql = new StringBuilder ("UPDATE I_BankStatement o ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '") @@ -141,7 +141,7 @@ public class ImportBankStatement extends SvrProcess .append("OR i.I_IsImported IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Bank Account (With Routing No)=" + no); + if (log.isLoggable(Level.INFO)) log.info("Bank Account (With Routing No)=" + no); // sql = new StringBuilder("UPDATE I_BankStatement i ") .append("SET C_BankAccount_ID=") @@ -158,7 +158,7 @@ public class ImportBankStatement extends SvrProcess .append("OR i.I_isImported IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Bank Account (Without Routing No)=" + no); + if (log.isLoggable(Level.INFO)) log.info("Bank Account (Without Routing No)=" + no); // sql = new StringBuilder("UPDATE I_BankStatement i ") .append("SET C_BankAccount_ID=(SELECT C_BankAccount_ID FROM C_BankAccount a WHERE a.C_BankAccount_ID=").append(p_C_BankAccount_ID) @@ -169,7 +169,7 @@ public class ImportBankStatement extends SvrProcess .append("OR i.I_isImported IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Bank Account=" + no); + if (log.isLoggable(Level.INFO)) log.info("Bank Account=" + no); // sql = new StringBuilder("UPDATE I_BankStatement ") .append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Bank Account, ' ") @@ -188,7 +188,7 @@ public class ImportBankStatement extends SvrProcess .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Set Currency=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no); // sql = new StringBuilder("UPDATE I_BankStatement i ") .append("SET C_Currency_ID=(SELECT C_Currency_ID FROM C_BankAccount WHERE C_BankAccount_ID=i.C_BankAccount_ID) ") @@ -196,7 +196,7 @@ public class ImportBankStatement extends SvrProcess .append("AND i.ISO_Code IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Set Currency=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no); // sql = new StringBuilder ("UPDATE I_BankStatement ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Currency,' ") @@ -215,7 +215,7 @@ public class ImportBankStatement extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Charge Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("Charge Amount=" + no); // sql = new StringBuilder("UPDATE I_BankStatement ") .append("SET InterestAmt=0 ") @@ -223,7 +223,7 @@ public class ImportBankStatement extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Interest Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("Interest Amount=" + no); // sql = new StringBuilder("UPDATE I_BankStatement ") .append("SET TrxAmt=StmtAmt - InterestAmt - ChargeAmt ") @@ -231,7 +231,7 @@ public class ImportBankStatement extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Transaction Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("Transaction Amount=" + no); // sql = new StringBuilder("UPDATE I_BankStatement ") .append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'Err=Invalid Amount, ' ") @@ -239,7 +239,7 @@ public class ImportBankStatement extends SvrProcess .append("AND I_isImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Invaid Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("Invalid Amount=" + no); // Set Valuta Date sql = new StringBuilder("UPDATE I_BankStatement ") @@ -248,7 +248,7 @@ public class ImportBankStatement extends SvrProcess .append("AND I_isImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Valuta Date=" + no); + if (log.isLoggable(Level.INFO)) log.info("Valuta Date=" + no); // Check Payment<->Invoice combination sql = new StringBuilder("UPDATE I_BankStatement ") @@ -263,7 +263,7 @@ public class ImportBankStatement extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Payment<->Invoice Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Payment<->Invoice Mismatch=" + no); // Check Payment<->BPartner combination sql = new StringBuilder("UPDATE I_BankStatement ") @@ -278,7 +278,7 @@ public class ImportBankStatement extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Payment<->BPartner Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Payment<->BPartner Mismatch=" + no); // Check Invoice<->BPartner combination sql = new StringBuilder("UPDATE I_BankStatement ") @@ -293,7 +293,7 @@ public class ImportBankStatement extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Invoice<->BPartner Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Invoice<->BPartner Mismatch=" + no); // Check Invoice.BPartner<->Payment.BPartner combination sql = new StringBuilder("UPDATE I_BankStatement ") @@ -308,7 +308,7 @@ public class ImportBankStatement extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no); // Detect Duplicates sql = new StringBuilder("SELECT i.I_BankStatement_ID, l.C_BankStatementLine_ID, i.EftTrxID ") @@ -357,7 +357,7 @@ public class ImportBankStatement extends SvrProcess pupdt = null; } if (no != 0) - log.info("Duplicates=" + no); + if (log.isLoggable(Level.INFO)) log.info("Duplicates=" + no); commitEx(); @@ -386,7 +386,7 @@ public class ImportBankStatement extends SvrProcess account = MBankAccount.get (m_ctx, imp.getC_BankAccount_ID()); statement = null; msglog = new StringBuilder("New Statement, Account=").append(account.getAccountNo()); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); } // Create a new Bank Statement for every account else if (account.getC_BankAccount_ID() != imp.getC_BankAccount_ID()) @@ -394,7 +394,7 @@ public class ImportBankStatement extends SvrProcess account = MBankAccount.get (m_ctx, imp.getC_BankAccount_ID()); statement = null; msglog = new StringBuilder("New Statement, Account=").append(account.getAccountNo()); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); } // Create a new Bank Statement for every statement name else if ((statement.getName() != null) && (imp.getName() != null)) @@ -403,7 +403,7 @@ public class ImportBankStatement extends SvrProcess { statement = null; msglog = new StringBuilder("New Statement, Statement Name=").append(imp.getName()); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); } } // Create a new Bank Statement for every statement reference @@ -413,7 +413,7 @@ public class ImportBankStatement extends SvrProcess { statement = null; msglog = new StringBuilder("New Statement, Statement Reference=").append(imp.getEftStatementReference()); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); } } // Create a new Bank Statement for every statement date @@ -423,7 +423,7 @@ public class ImportBankStatement extends SvrProcess { statement = null; msglog = new StringBuilder("New Statement, Statement Date=").append(imp.getStatementDate()); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java b/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java index 743d5145f2..a95a32dcf5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java @@ -89,7 +89,7 @@ public class ImportConversionRate extends SvrProcess .append(",C_ConversionType_ID=").append(p_C_ConversionType_ID) .append(",ValidFrom=").append(p_ValidFrom) .append(",CreateReciprocalRate=").append(p_CreateReciprocalRate); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); // StringBuilder sql = null; int no = 0; @@ -126,7 +126,7 @@ public class ImportConversionRate extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset =" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset =" + no); // Org sql = new StringBuilder ("UPDATE I_Conversion_Rate o ") diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java b/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java index 04ff010163..b0e954d267 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java @@ -59,7 +59,7 @@ public class ImportDelete extends SvrProcess protected String doIt() throws Exception { StringBuilder msglog = new StringBuilder("AD_Table_ID=").append(p_AD_Table_ID); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); // get Table Info MTable table = new MTable (getCtx(), p_AD_Table_ID, get_TrxName()); if (table.get_ID() == 0){ diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java index c568252a52..b4a2b0b1d5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java @@ -96,7 +96,7 @@ public class ImportGLJournal extends SvrProcess protected String doIt() throws java.lang.Exception { StringBuilder msglog = new StringBuilder("IsValidateOnly=").append(m_IsValidateOnly).append(", IsImportOnlyNoErrors=").append(m_IsImportOnlyNoErrors); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); StringBuilder sql = null; int no = 0; StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(m_AD_Client_ID); @@ -123,7 +123,7 @@ public class ImportGLJournal extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); // Set Client from Name sql = new StringBuilder ("UPDATE I_GLJournal i ") @@ -598,9 +598,9 @@ public class ImportGLJournal extends SvrProcess BigDecimal source = rs.getBigDecimal(1); BigDecimal acct = rs.getBigDecimal(2); if (source != null && source.signum() == 0 - && acct != null && acct.signum() == 0) - log.info ("Import Balance = 0"); - else{ + && acct != null && acct.signum() == 0) { + if (log.isLoggable(Level.INFO)) log.info ("Import Balance = 0"); + } else { msglog = new StringBuilder("Balance Source=").append(source).append(", Acct=").append(acct); log.warning(msglog.toString()); } @@ -638,7 +638,7 @@ public class ImportGLJournal extends SvrProcess return msgreturn.toString(); } msglog = new StringBuilder("Validation Errors=").append(errors); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); // moved commit above to save error messages // commit(); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java b/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java index ea9850e01d..d8dc2f2a22 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInOutConfirm.java @@ -69,7 +69,7 @@ public class ImportInOutConfirm extends SvrProcess protected String doIt () throws Exception { StringBuilder msglog = new StringBuilder("I_InOutLineConfirm_ID=").append(p_I_InOutLineConfirm_ID); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); StringBuilder sql = null; int no = 0; StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(p_AD_Client_ID); @@ -94,7 +94,7 @@ public class ImportInOutConfirm extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); // Set Client from Name sql = new StringBuilder ("UPDATE I_InOutLineConfirm i ") diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java index 5c85243c54..f84c7c0143 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInventory.java @@ -119,7 +119,7 @@ public class ImportInventory extends SvrProcess protected String doIt() throws java.lang.Exception { StringBuilder msglog = new StringBuilder("M_Locator_ID=").append(p_M_Locator_ID).append(",MovementDate=").append(p_MovementDate); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); if (p_UpdateCosting) { if (p_C_AcctSchema_ID <= 0) { @@ -168,7 +168,7 @@ public class ImportInventory extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate (sql.toString (), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); sql = new StringBuilder ("UPDATE I_Inventory o ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '") diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java index 5f38d284e9..b90fc13d7e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java @@ -114,7 +114,7 @@ public class ImportInvoice extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); sql = new StringBuilder ("UPDATE I_Invoice o ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '") diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java index 93de2663e6..bcf3992bb2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java @@ -116,7 +116,7 @@ public class ImportOrder extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); sql = new StringBuilder ("UPDATE I_Order o ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '") diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java index 632e476d4e..88388763c5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java @@ -82,13 +82,13 @@ public class ImportPayment extends SvrProcess */ protected String doIt() throws Exception { - log.info("C_BankAccount_ID" + p_C_BankAccount_ID); + if (log.isLoggable(Level.INFO)) log.info("C_BankAccount_ID" + p_C_BankAccount_ID); MBankAccount ba = MBankAccount.get(getCtx(), p_C_BankAccount_ID); if (p_C_BankAccount_ID == 0 || ba.get_ID() != p_C_BankAccount_ID) throw new AdempiereUserError("@NotFound@ @C_BankAccount_ID@ - " + p_C_BankAccount_ID); if (p_AD_Org_ID != ba.getAD_Org_ID() && ba.getAD_Org_ID() != 0) p_AD_Org_ID = ba.getAD_Org_ID(); - log.info("AD_Org_ID=" + p_AD_Org_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Org_ID=" + p_AD_Org_ID); StringBuilder sql = null; int no = 0; @@ -118,7 +118,7 @@ public class ImportPayment extends SvrProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL OR AD_Client_ID IS NULL OR AD_Org_ID IS NULL OR AD_Client_ID=0 OR AD_Org_ID=0"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); sql = new StringBuilder ("UPDATE I_Payment o ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Org, '") @@ -147,7 +147,7 @@ public class ImportPayment extends SvrProcess .append("OR i.I_IsImported IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Bank Account (With Routing No)=" + no); + if (log.isLoggable(Level.INFO)) log.info("Bank Account (With Routing No)=" + no); // sql = new StringBuilder("UPDATE I_Payment i ") .append("SET C_BankAccount_ID=") @@ -164,7 +164,7 @@ public class ImportPayment extends SvrProcess .append("OR i.I_isImported IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Bank Account (Without Routing No)=" + no); + if (log.isLoggable(Level.INFO)) log.info("Bank Account (Without Routing No)=" + no); // sql = new StringBuilder("UPDATE I_Payment i ") .append("SET C_BankAccount_ID=(SELECT C_BankAccount_ID FROM C_BankAccount a WHERE a.C_BankAccount_ID=").append(p_C_BankAccount_ID); @@ -175,7 +175,7 @@ public class ImportPayment extends SvrProcess .append("OR i.I_isImported IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Bank Account=" + no); + if (log.isLoggable(Level.INFO)) log.info("Bank Account=" + no); // sql = new StringBuilder("UPDATE I_Payment ") .append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Bank Account, ' ") @@ -194,7 +194,7 @@ public class ImportPayment extends SvrProcess .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Set Currency=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no); // sql = new StringBuilder("UPDATE I_Payment i ") .append("SET C_Currency_ID=(SELECT C_Currency_ID FROM C_BankAccount WHERE C_BankAccount_ID=i.C_BankAccount_ID) ") @@ -202,7 +202,7 @@ public class ImportPayment extends SvrProcess .append("AND i.ISO_Code IS NULL").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Set Currency=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set Currency=" + no); // sql = new StringBuilder ("UPDATE I_Payment ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Currency,' ") @@ -220,7 +220,7 @@ public class ImportPayment extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Charge Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("Charge Amount=" + no); // sql = new StringBuilder("UPDATE I_Payment ") .append("SET TaxAmt=0 ") @@ -228,7 +228,7 @@ public class ImportPayment extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Tax Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("Tax Amount=" + no); // sql = new StringBuilder("UPDATE I_Payment ") .append("SET WriteOffAmt=0 ") @@ -236,7 +236,7 @@ public class ImportPayment extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("WriteOff Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("WriteOff Amount=" + no); // sql = new StringBuilder("UPDATE I_Payment ") .append("SET DiscountAmt=0 ") @@ -244,7 +244,7 @@ public class ImportPayment extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Discount Amount=" + no); + if (log.isLoggable(Level.INFO)) log.info("Discount Amount=" + no); // // Set Date @@ -254,7 +254,7 @@ public class ImportPayment extends SvrProcess .append("AND I_isImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Trx Date=" + no); + if (log.isLoggable(Level.INFO)) log.info("Trx Date=" + no); sql = new StringBuilder("UPDATE I_Payment ") .append("SET DateAcct=DateTrx ") @@ -262,7 +262,7 @@ public class ImportPayment extends SvrProcess .append("AND I_isImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Acct Date=" + no); + if (log.isLoggable(Level.INFO)) log.info("Acct Date=" + no); // Invoice sql = new StringBuilder ("UPDATE I_Payment i ") @@ -316,7 +316,7 @@ public class ImportPayment extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Payment<->Invoice Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Payment<->Invoice Mismatch=" + no); // Check Payment<->BPartner combination sql = new StringBuilder("UPDATE I_Payment ") @@ -331,7 +331,7 @@ public class ImportPayment extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Payment<->BPartner Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Payment<->BPartner Mismatch=" + no); // Check Invoice<->BPartner combination sql = new StringBuilder("UPDATE I_Payment ") @@ -346,7 +346,7 @@ public class ImportPayment extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Invoice<->BPartner Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Invoice<->BPartner Mismatch=" + no); // Check Invoice.BPartner<->Payment.BPartner combination sql = new StringBuilder("UPDATE I_Payment ") @@ -361,7 +361,7 @@ public class ImportPayment extends SvrProcess .append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no); + if (log.isLoggable(Level.INFO)) log.info("Invoice.BPartner<->Payment.BPartner Mismatch=" + no); // TrxType sql = new StringBuilder("UPDATE I_Payment ") @@ -370,7 +370,7 @@ public class ImportPayment extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("TrxType Default=" + no); + if (log.isLoggable(Level.INFO)) log.info("TrxType Default=" + no); // TenderType sql = new StringBuilder("UPDATE I_Payment ") @@ -379,7 +379,7 @@ public class ImportPayment extends SvrProcess .append("AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("TenderType Default=" + no); + if (log.isLoggable(Level.INFO)) log.info("TenderType Default=" + no); // Document Type sql = new StringBuilder ("UPDATE I_Payment i ") @@ -427,7 +427,7 @@ public class ImportPayment extends SvrProcess if (account == null || account.getC_BankAccount_ID() != imp.getC_BankAccount_ID()) { account = MBankAccount.get (m_ctx, imp.getC_BankAccount_ID()); - log.info("New Account=" + account.getAccountNo()); + if (log.isLoggable(Level.INFO)) log.info("New Account=" + account.getAccountNo()); } // New Payment diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java b/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java index 536bb7fed3..27fbbababf 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java @@ -112,7 +112,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess sql = new StringBuilder ("DELETE I_Product ") .append("WHERE I_IsImported='Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Delete Old Imported =" + no); + if (log.isLoggable(Level.INFO)) log.info("Delete Old Imported =" + no); } // Set Client, Org, IaActive, Created/Updated, ProductType @@ -129,7 +129,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append(" I_IsImported = 'N' ") .append("WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info("Reset=" + no); ModelValidationEngine.get().fireImportValidate(this, null, null, ImportValidator.TIMING_BEFORE_VALIDATE); @@ -140,7 +140,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE C_BPartner_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("BPartner=" + no); + if (log.isLoggable(Level.INFO)) log.info("BPartner=" + no); // sql = new StringBuilder ("UPDATE I_Product ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid BPartner,' ") @@ -159,7 +159,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE M_Product_ID IS NULL") .append(" AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Product Existing UPC=" + no); + if (log.isLoggable(Level.INFO)) log.info("Product Existing UPC=" + no); // Value sql = new StringBuilder ("UPDATE I_Product i ") @@ -168,7 +168,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE M_Product_ID IS NULL") .append(" AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Product Existing Value=" + no); + if (log.isLoggable(Level.INFO)) log.info("Product Existing Value=" + no); // BP ProdNo sql = new StringBuilder ("UPDATE I_Product i ") @@ -178,7 +178,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE M_Product_ID IS NULL") .append(" AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Product Existing Vendor ProductNo=" + no); + if (log.isLoggable(Level.INFO)) log.info("Product Existing Vendor ProductNo=" + no); // Set Product Category sql = new StringBuilder ("UPDATE I_Product ") @@ -196,7 +196,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE ProductCategory_Value IS NOT NULL AND M_Product_Category_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Set Category=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set Category=" + no); // Copy From Product if Import does not have value @@ -285,7 +285,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE C_UOM_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Set UOM=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set UOM=" + no); // sql = new StringBuilder ("UPDATE I_Product ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid UOM, ' ") @@ -313,7 +313,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE C_Currency_ID IS NULL") .append(" AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("doIt- Set Currency=" + no); + if (log.isLoggable(Level.INFO)) log.info("doIt- Set Currency=" + no); // sql = new StringBuilder ("UPDATE I_Product ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Currency,' ") @@ -370,7 +370,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE C_BPartner_ID IS NOT NULL AND VendorProductNo IS NULL") .append(" AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("VendorProductNo Set to Value=" + no); + if (log.isLoggable(Level.INFO)) log.info("VendorProductNo Set to Value=" + no); // sql = new StringBuilder ("UPDATE I_Product i ") .append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=VendorProductNo not unique,' ") diff --git a/org.adempiere.base.process/src/org/compiere/process/InOutCreateConfirm.java b/org.adempiere.base.process/src/org/compiere/process/InOutCreateConfirm.java index a56d35632e..a4d77b1162 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InOutCreateConfirm.java +++ b/org.adempiere.base.process/src/org/compiere/process/InOutCreateConfirm.java @@ -61,7 +61,7 @@ public class InOutCreateConfirm extends SvrProcess */ protected String doIt () throws Exception { - log.info("M_InOut_ID=" + p_M_InOut_ID + ", Type=" + p_ConfirmType); + if (log.isLoggable(Level.INFO)) log.info("M_InOut_ID=" + p_M_InOut_ID + ", Type=" + p_ConfirmType); MInOut shipment = new MInOut (getCtx(), p_M_InOut_ID, get_TrxName()); if (shipment.get_ID() == 0) throw new IllegalArgumentException("Not found M_InOut_ID=" + p_M_InOut_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/InOutCreateInvoice.java b/org.adempiere.base.process/src/org/compiere/process/InOutCreateInvoice.java index 4a9c781e51..9076dea73e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InOutCreateInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/InOutCreateInvoice.java @@ -73,7 +73,7 @@ public class InOutCreateInvoice extends SvrProcess */ protected String doIt () throws Exception { - log.info("M_InOut_ID=" + p_M_InOut_ID + if (log.isLoggable(Level.INFO)) log.info("M_InOut_ID=" + p_M_InOut_ID + ", M_PriceList_ID=" + p_M_PriceList_ID + ", InvoiceDocumentNo=" + p_InvoiceDocumentNo); if (p_M_InOut_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java b/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java index c85ac7cbdf..0e523c7a96 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java @@ -135,7 +135,7 @@ public class InOutGenerate extends SvrProcess */ protected String doIt () throws Exception { - log.info("Selection=" + p_Selection + if (log.isLoggable(Level.INFO)) log.info("Selection=" + p_Selection + ", M_Warehouse_ID=" + p_M_Warehouse_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + ", Consolidate=" + p_ConsolidateDocument diff --git a/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java b/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java index 7a98322ec2..955def4373 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java @@ -105,7 +105,7 @@ public class InventoryCountCreate extends SvrProcess */ protected String doIt () throws Exception { - log.info("M_Inventory_ID=" + p_M_Inventory_ID + if (log.isLoggable(Level.INFO)) log.info("M_Inventory_ID=" + p_M_Inventory_ID + ", M_Locator_ID=" + p_M_Locator_ID + ", LocatorValue=" + p_LocatorValue + ", ProductValue=" + p_ProductValue + ", M_Product_Category_ID=" + p_M_Product_Category_ID @@ -255,7 +255,7 @@ public class InventoryCountCreate extends SvrProcess .append("SET QtyCount=0 ") .append("WHERE M_Inventory_ID=").append(p_M_Inventory_ID); int no = DB.executeUpdate(sql1.toString(), get_TrxName()); - log.info("Set Cont to Zero=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set Cont to Zero=" + no); } // diff --git a/org.adempiere.base.process/src/org/compiere/process/InventoryCountUpdate.java b/org.adempiere.base.process/src/org/compiere/process/InventoryCountUpdate.java index 4cfcb5428b..f8767a1469 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InventoryCountUpdate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InventoryCountUpdate.java @@ -69,7 +69,7 @@ public class InventoryCountUpdate extends SvrProcess */ protected String doIt () throws Exception { - log.info("M_Inventory_ID=" + p_M_Inventory_ID); + if (log.isLoggable(Level.INFO)) log.info("M_Inventory_ID=" + p_M_Inventory_ID); MInventory inventory = new MInventory (getCtx(), p_M_Inventory_ID, get_TrxName()); if (inventory.get_ID() == 0) throw new AdempiereSystemError ("Not found: M_Inventory_ID=" + p_M_Inventory_ID); @@ -84,10 +84,10 @@ public class InventoryCountUpdate extends SvrProcess .append(" GROUP BY M_Product_ID, M_Locator_ID, M_AttributeSetInstance_ID ") .append("HAVING COUNT(*) > 1)"); int multiple = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Multiple=" + multiple); + if (log.isLoggable(Level.INFO)) log.info("Multiple=" + multiple); int delMA = MInventoryLineMA.deleteInventoryMA(p_M_Inventory_ID, get_TrxName()); - log.info("DeletedMA=" + delMA); + if (log.isLoggable(Level.INFO)) log.info("DeletedMA=" + delMA); // ASI sql = new StringBuilder("UPDATE M_InventoryLine l ") @@ -103,7 +103,7 @@ public class InventoryCountUpdate extends SvrProcess .append("WHERE s.M_Product_ID=l.M_Product_ID AND s.M_Locator_ID=l.M_Locator_ID") .append(" AND s.M_AttributeSetInstance_ID=l.M_AttributeSetInstance_ID)"); int no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Update with ASI=" + no); + if (log.isLoggable(Level.INFO)) log.info("Update with ASI=" + no); // No ASI int noMA = updateWithMA(); @@ -115,7 +115,7 @@ public class InventoryCountUpdate extends SvrProcess .append("SET QtyCount=0 ") .append("WHERE M_Inventory_ID=").append(p_M_Inventory_ID); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info("Set Count to Zero=" + no); + if (log.isLoggable(Level.INFO)) log.info("Set Count to Zero=" + no); } if (multiple > 0){ @@ -181,7 +181,7 @@ public class InventoryCountUpdate extends SvrProcess pstmt = null; } // - log.info("#" + no); + if (log.isLoggable(Level.INFO)) log.info("#" + no); return no; } // updateWithMA diff --git a/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java b/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java index fc041f8661..b2e88dea3d 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java +++ b/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java @@ -84,7 +84,7 @@ public class InventoryValue extends SvrProcess */ protected String doIt() throws Exception { - log.info("M_Warehouse_ID=" + p_M_Warehouse_ID + if (log.isLoggable(Level.INFO)) log.info("M_Warehouse_ID=" + p_M_Warehouse_ID + ",C_Currency_ID=" + p_C_Currency_ID + ",DateValue=" + p_DateValue + ",M_PriceList_Version_ID=" + p_M_PriceList_Version_ID diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java index e6941c5dfb..aa4ebfad9d 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceBatchProcess.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MInvoice; import org.compiere.model.MInvoiceBatch; import org.compiere.model.MInvoiceBatchLine; @@ -73,7 +75,7 @@ public class InvoiceBatchProcess extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_InvoiceBatch_ID=" + p_C_InvoiceBatch_ID + ", DocAction=" + p_DocAction); + if (log.isLoggable(Level.INFO)) log.info("C_InvoiceBatch_ID=" + p_C_InvoiceBatch_ID + ", DocAction=" + p_DocAction); if (p_C_InvoiceBatch_ID == 0) throw new AdempiereUserError("C_InvoiceBatch_ID = 0"); MInvoiceBatch batch = new MInvoiceBatch(getCtx(), p_C_InvoiceBatch_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceCreateInOut.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceCreateInOut.java index 51b33ac208..d942ee8cb5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceCreateInOut.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceCreateInOut.java @@ -74,7 +74,7 @@ public class InvoiceCreateInOut extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_Invoice_ID=" + p_C_Invoice_ID + ", M_Warehouse_ID=" + p_M_Warehouse_ID); + if (log.isLoggable(Level.INFO)) log.info("C_Invoice_ID=" + p_C_Invoice_ID + ", M_Warehouse_ID=" + p_M_Warehouse_ID); if (p_C_Invoice_ID <= 0) throw new FillMandatoryException("C_Invoice_ID"); if (p_M_Warehouse_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java index 5fae9440e1..28da912213 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java @@ -124,7 +124,7 @@ public class InvoiceGenerate extends SvrProcess */ protected String doIt () throws Exception { - log.info("Selection=" + p_Selection + ", DateInvoiced=" + p_DateInvoiced + if (log.isLoggable(Level.INFO)) log.info("Selection=" + p_Selection + ", DateInvoiced=" + p_DateInvoiced + ", AD_Org_ID=" + p_AD_Org_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + ", C_Order_ID=" + p_C_Order_ID + ", DocAction=" + p_docAction + ", Consolidate=" + p_ConsolidateDocument); diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java index 794d54c0e0..8382d1f284 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceNGL.java @@ -34,7 +34,6 @@ import org.compiere.model.MJournalLine; import org.compiere.model.MOrg; import org.compiere.model.Query; import org.compiere.model.X_T_InvoiceGL; -import org.compiere.util.CLogMgt; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -104,7 +103,7 @@ public class InvoiceNGL extends SvrProcess { if (p_IsAllCurrencies) p_C_Currency_ID = 0; - log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID + if (log.isLoggable(Level.INFO)) log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID + ",C_ConversionTypeReval_ID=" + p_C_ConversionTypeReval_ID + ",DateReval=" + p_DateReval + ", APAR=" + p_APAR @@ -120,7 +119,7 @@ public class InvoiceNGL extends SvrProcess StringBuilder sql = new StringBuilder("DELETE T_InvoiceGL WHERE AD_PInstance_ID=").append(getAD_PInstance_ID()); int no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no > 0) - log.info("Deleted #" + no); + if (log.isLoggable(Level.INFO)) log.info("Deleted #" + no); // Insert Trx String dateStr = DB.TO_DATE(p_DateReval, true); @@ -158,12 +157,13 @@ public class InvoiceNGL extends SvrProcess sql.append(" AND i.C_Currency_ID=").append(p_C_Currency_ID); no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no != 0) - log.info("Inserted #" + no); - else if (CLogMgt.isLevelFiner()) - log.warning("Inserted #" + no + " - " + sql); - else - log.warning("Inserted #" + no); + if (no != 0) { + if (log.isLoggable(Level.INFO)) log.info("Inserted #" + no); + } else if (log.isLoggable(Level.FINER)) { + log.warning("Inserted #" + no + " - " + sql); + } else { + log.warning("Inserted #" + no); + } // Calculate Difference sql = new StringBuilder("UPDATE T_InvoiceGL gl ") @@ -181,13 +181,13 @@ public class InvoiceNGL extends SvrProcess .append("WHERE GrandTotal=OpenAmt AND AD_PInstance_ID=").append(getAD_PInstance_ID()); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no > 0) - log.info("Not Paid #" + no); + if (log.isLoggable(Level.INFO)) log.info("Not Paid #" + no); sql = new StringBuilder("UPDATE T_InvoiceGL SET Percent = ROUND(OpenAmt*100/GrandTotal,6) ") .append("WHERE GrandTotal<>OpenAmt AND GrandTotal <> 0 AND AD_PInstance_ID=").append(getAD_PInstance_ID()); no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no > 0) - log.info("Partial Paid #" + no); + if (log.isLoggable(Level.INFO)) log.info("Partial Paid #" + no); sql = new StringBuilder("UPDATE T_InvoiceGL SET AmtRevalDr = AmtRevalDr * Percent/100,") .append(" AmtRevalCr = AmtRevalCr * Percent/100,") diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java b/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java index ebdb180fec..2377b382da 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoicePayScheduleValidate.java @@ -55,7 +55,7 @@ public class InvoicePayScheduleValidate extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_InvoicePaySchedule_ID=" + getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info ("C_InvoicePaySchedule_ID=" + getRecord_ID()); MInvoicePaySchedule[] schedule = MInvoicePaySchedule.getInvoicePaySchedule (getCtx(), 0, getRecord_ID(), null); if (schedule.length == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java b/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java index 95daeb5c29..2d73778a12 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoicePrint.java @@ -108,7 +108,7 @@ public class InvoicePrint extends SvrProcess // Need to have Template if (p_EMailPDF && p_R_MailText_ID == 0) throw new AdempiereUserError ("@NotFound@: @R_MailText_ID@"); - log.info ("C_BPartner_ID=" + m_C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info ("C_BPartner_ID=" + m_C_BPartner_ID + ", C_Invoice_ID=" + m_C_Invoice_ID + ", EmailPDF=" + p_EMailPDF + ",R_MailText_ID=" + p_R_MailText_ID + ", DateInvoiced=" + m_dateInvoiced_From + "-" + m_dateInvoiced_To diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceWriteOff.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceWriteOff.java index 675af55c1e..a941d8df11 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InvoiceWriteOff.java +++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceWriteOff.java @@ -120,7 +120,7 @@ public class InvoiceWriteOff extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_BPartner_ID=" + p_C_BPartner_ID + if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_Invoice_ID=" + p_C_Invoice_ID + "; APAR=" + p_APAR diff --git a/org.adempiere.base.process/src/org/compiere/process/IssueReport.java b/org.adempiere.base.process/src/org/compiere/process/IssueReport.java index 991433a864..bedaf247bc 100644 --- a/org.adempiere.base.process/src/org/compiere/process/IssueReport.java +++ b/org.adempiere.base.process/src/org/compiere/process/IssueReport.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MIssue; import org.compiere.model.MSystem; import org.compiere.util.AdempiereSystemError; @@ -46,7 +48,7 @@ public class IssueReport extends SvrProcess */ protected String doIt () throws Exception { - log.info("AD_Issue_ID=" + m_AD_Issue_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Issue_ID=" + m_AD_Issue_ID); if (!MSystem.get(getCtx()).isAutoErrorReport()) return "NOT reported - Enable Error Reporting in Window System"; // diff --git a/org.adempiere.base.process/src/org/compiere/process/LandedCostDistribute.java b/org.adempiere.base.process/src/org/compiere/process/LandedCostDistribute.java index a4b1c95469..10199a5130 100644 --- a/org.adempiere.base.process/src/org/compiere/process/LandedCostDistribute.java +++ b/org.adempiere.base.process/src/org/compiere/process/LandedCostDistribute.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MLandedCost; import org.compiere.util.AdempiereUserError; @@ -48,7 +50,7 @@ public class LandedCostDistribute extends SvrProcess protected String doIt () throws Exception { m_lc = new MLandedCost (getCtx(), p_C_LandedCost_ID, get_TrxName()); - log.info(m_lc.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_lc.toString()); if (m_lc.get_ID() == 0) throw new AdempiereUserError("@NotFound@: @C_LandedCost_ID@ - " + p_C_LandedCost_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/LoadBankStatement.java b/org.adempiere.base.process/src/org/compiere/process/LoadBankStatement.java index 040bb8ad77..7ddcd7538f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/LoadBankStatement.java +++ b/org.adempiere.base.process/src/org/compiere/process/LoadBankStatement.java @@ -76,10 +76,12 @@ public class LoadBankStatement extends SvrProcess log.log(Level.SEVERE, "Unknown Parameter: " + name); } m_AD_Client_ID = Env.getAD_Client_ID(m_ctx); - log.info("AD_Client_ID=" + m_AD_Client_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Client_ID=" + m_AD_Client_ID); m_AD_Org_ID = Env.getAD_Org_ID(m_ctx); - log.info("AD_Org_ID=" + m_AD_Org_ID); - log.info("C_BankStatementLoader_ID=" + m_C_BankStmtLoader_ID); + if (log.isLoggable(Level.INFO)){ + log.info("AD_Org_ID=" + m_AD_Org_ID); + log.info("C_BankStatementLoader_ID=" + m_C_BankStmtLoader_ID); + } } // prepare @@ -94,7 +96,7 @@ public class LoadBankStatement extends SvrProcess String message = "@Error@"; m_controller = new MBankStatementLoader(m_ctx, m_C_BankStmtLoader_ID, fileName, get_TrxName()); - log.info(m_controller.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_controller.toString()); if (m_controller == null || m_controller.get_ID() == 0) log.log(Level.SEVERE, "Invalid Loader"); @@ -105,7 +107,7 @@ public class LoadBankStatement extends SvrProcess else { - log.info("Imported=" + m_controller.getLoadCount()); + if (log.isLoggable(Level.INFO)) log.info("Imported=" + m_controller.getLoadCount()); addLog (0, null, new BigDecimal (m_controller.getLoadCount()), "@Loaded@"); message = "@OK@"; } diff --git a/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java b/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java index 7a7fa1c242..0aabf53a49 100644 --- a/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java +++ b/org.adempiere.base.process/src/org/compiere/process/MatchInvDelete.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MMatchInv; import org.compiere.util.AdempiereUserError; @@ -46,7 +48,7 @@ public class MatchInvDelete extends SvrProcess */ protected String doIt() throws Exception { - log.info ("M_MatchInv_ID=" + p_M_MatchInv_ID); + if (log.isLoggable(Level.INFO)) log.info ("M_MatchInv_ID=" + p_M_MatchInv_ID); MMatchInv inv = new MMatchInv (getCtx(), p_M_MatchInv_ID, get_TrxName()); if (inv.get_ID() == 0) throw new AdempiereUserError("@NotFound@ @M_MatchInv_ID@ " + p_M_MatchInv_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java b/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java index 2263721e4e..01542cdad4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java +++ b/org.adempiere.base.process/src/org/compiere/process/MatchPODelete.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.util.logging.Level; + import org.compiere.model.MMatchPO; import org.compiere.model.MOrderLine; import org.compiere.util.AdempiereUserError; @@ -50,7 +52,7 @@ public class MatchPODelete extends SvrProcess */ protected String doIt() throws Exception { - log.info ("M_MatchPO_ID=" + p_M_MatchPO_ID); + if (log.isLoggable(Level.INFO)) log.info ("M_MatchPO_ID=" + p_M_MatchPO_ID); MMatchPO po = new MMatchPO (getCtx(), p_M_MatchPO_ID, get_TrxName()); if (po.get_ID() == 0) throw new AdempiereUserError("@NotFound@ @M_MatchPO_ID@ " + p_M_MatchPO_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/NoteDelete.java b/org.adempiere.base.process/src/org/compiere/process/NoteDelete.java index 0d1cf112e7..07ab4b23af 100644 --- a/org.adempiere.base.process/src/org/compiere/process/NoteDelete.java +++ b/org.adempiere.base.process/src/org/compiere/process/NoteDelete.java @@ -64,7 +64,7 @@ public class NoteDelete extends SvrProcess */ protected String doIt() throws Exception { - log.info("doIt - AD_User_ID=" + p_AD_User_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - AD_User_ID=" + p_AD_User_ID); StringBuilder sql = new StringBuilder("DELETE FROM AD_Note WHERE AD_BroadcastMessage_ID IS NULL AND AD_Client_ID=").append(getAD_Client_ID()); if (p_AD_User_ID > 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java b/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java index cd11a5cd78..1016fbbde4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java @@ -88,7 +88,7 @@ public class OrderBatchProcess extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_DocTypeTarget_ID=" + p_C_DocTypeTarget_ID + ", DocStatus=" + p_DocStatus + if (log.isLoggable(Level.INFO)) log.info("C_DocTypeTarget_ID=" + p_C_DocTypeTarget_ID + ", DocStatus=" + p_DocStatus + ", IsSelfService=" + p_IsSelfService + ", C_BPartner_ID=" + p_C_BPartner_ID + ", DateOrdered=" + p_DateOrdered_From + "->" + p_DateOrdered_To + ", DocAction=" + p_DocAction + ", IsDelivered=" + p_IsDelivered @@ -164,7 +164,7 @@ public class OrderBatchProcess extends SvrProcess */ private boolean process (MOrder order) { - log.info(order.toString()); + if (log.isLoggable(Level.INFO)) log.info(order.toString()); // order.setDocAction(p_DocAction); if (order.processIt(p_DocAction)) diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateProduction.java b/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateProduction.java index 6029082c9c..b6c42baa37 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateProduction.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateProduction.java @@ -75,7 +75,7 @@ public class OrderLineCreateProduction extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_OrderLine_ID=" + p_C_OrderLine_ID ); + if (log.isLoggable(Level.INFO)) log.info("C_OrderLine_ID=" + p_C_OrderLine_ID ); if (p_C_OrderLine_ID == 0) throw new IllegalArgumentException("No OrderLine"); // diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java b/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java index e40193136e..4a834142a6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java @@ -70,7 +70,7 @@ public class OrderLineCreateShipment extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_OrderLine_ID=" + p_C_OrderLine_ID ); + if (log.isLoggable(Level.INFO)) log.info("C_OrderLine_ID=" + p_C_OrderLine_ID ); if (p_C_OrderLine_ID == 0) throw new IllegalArgumentException("No OrderLine"); // diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderOpen.java b/org.adempiere.base.process/src/org/compiere/process/OrderOpen.java index d5add17c95..884acd17cc 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderOpen.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderOpen.java @@ -57,7 +57,7 @@ public class OrderOpen extends SvrProcess */ protected String doIt() throws AdempiereSystemError { - log.info("doIt - Open C_Order_ID=" + p_C_Order_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - Open C_Order_ID=" + p_C_Order_ID); if (p_C_Order_ID == 0) return ""; // diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderPOCreate.java b/org.adempiere.base.process/src/org/compiere/process/OrderPOCreate.java index 53ac1734e4..3b7e321040 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderPOCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderPOCreate.java @@ -95,7 +95,7 @@ public class OrderPOCreate extends SvrProcess */ protected String doIt() throws Exception { - log.info("DateOrdered=" + p_DateOrdered_From + " - " + p_DateOrdered_To + if (log.isLoggable(Level.INFO)) log.info("DateOrdered=" + p_DateOrdered_From + " - " + p_DateOrdered_To + " - C_BPartner_ID=" + p_C_BPartner_ID + " - Vendor_ID=" + p_Vendor_ID + " - IsDropShip=" + p_IsDropShip + " - C_Order_ID=" + p_C_Order_ID); if (p_C_Order_ID == 0 @@ -175,7 +175,7 @@ public class OrderPOCreate extends SvrProcess */ private int createPOFromSO (MOrder so) throws Exception { - log.info(so.toString()); + if (log.isLoggable(Level.INFO)) log.info(so.toString()); MOrderLine[] soLines = so.getLines(true, null); if (soLines == null || soLines.length == 0) { diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java b/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java index 034601c38e..761185e5ff 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderPayScheduleValidate.java @@ -54,7 +54,7 @@ public class OrderPayScheduleValidate extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_OrderPaySchedule_ID=" + getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info ("C_OrderPaySchedule_ID=" + getRecord_ID()); MOrderPaySchedule[] schedule = MOrderPaySchedule.getOrderPaySchedule (getCtx(), 0, getRecord_ID(), null); if (schedule.length == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java index acb414438f..81bbf52711 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java @@ -65,7 +65,7 @@ public class OrderRePrice extends SvrProcess */ protected String doIt() throws Exception { - log.info("C_Order_ID=" + p_C_Order_ID + ", C_Invoice_ID=" + p_C_Invoice_ID); + if (log.isLoggable(Level.INFO)) log.info("C_Order_ID=" + p_C_Order_ID + ", C_Invoice_ID=" + p_C_Invoice_ID); if (p_C_Order_ID == 0 && p_C_Invoice_ID == 0) throw new IllegalArgumentException("Nothing to do"); diff --git a/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java b/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java index 6f97c475d7..9b5d695daa 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java @@ -79,7 +79,7 @@ public class OrgOwnership extends SvrProcess */ protected String doIt() throws Exception { - log.info ("doIt - AD_Org_ID=" + p_AD_Org_ID); + if (log.isLoggable(Level.INFO)) log.info ("doIt - AD_Org_ID=" + p_AD_Org_ID); if (p_AD_Org_ID < 0) throw new IllegalArgumentException ("OrgOwnership - invalid AD_Org_ID=" + p_AD_Org_ID); @@ -104,7 +104,7 @@ public class OrgOwnership extends SvrProcess */ private String warehouseOwnership () { - log.info ("warehouseOwnership - M_Warehouse_ID=" + p_M_Warehouse_ID); + if (log.isLoggable(Level.INFO)) log.info ("warehouseOwnership - M_Warehouse_ID=" + p_M_Warehouse_ID); if (p_AD_Org_ID == 0) throw new IllegalArgumentException ("Warehouse - Org cannot be * (0)"); @@ -169,7 +169,7 @@ public class OrgOwnership extends SvrProcess */ private String productOwnership () { - log.info ("productOwnership - M_Product_Category_ID=" + p_M_Product_Category_ID + if (log.isLoggable(Level.INFO)) log.info ("productOwnership - M_Product_Category_ID=" + p_M_Product_Category_ID + ", M_Product_ID=" + p_M_Product_ID); StringBuilder set = new StringBuilder(" SET AD_Org_ID=").append(p_AD_Org_ID); @@ -216,7 +216,7 @@ public class OrgOwnership extends SvrProcess */ private String bPartnerOwnership () { - log.info ("bPartnerOwnership - C_BP_Group_ID=" + p_C_BP_Group_ID + if (log.isLoggable(Level.INFO)) log.info ("bPartnerOwnership - C_BP_Group_ID=" + p_C_BP_Group_ID + ", C_BPartner_ID=" + p_C_BPartner_ID); StringBuilder set = new StringBuilder(" SET AD_Org_ID=").append(p_AD_Org_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java b/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java index 0e48097f2d..4a851db6d3 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java @@ -73,7 +73,7 @@ public class PackageCreate extends SvrProcess */ protected String doIt () throws Exception { - log.info("doIt - M_InOut_ID=" + p_M_InOut_ID + ", M_Shipper_ID=" + p_M_Shipper_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - M_InOut_ID=" + p_M_InOut_ID + ", M_Shipper_ID=" + p_M_Shipper_ID); if (p_M_InOut_ID == 0) throw new IllegalArgumentException("No Shipment"); if (p_M_Shipper_ID == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java index f4fa76d745..28c710a82c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateCheck.java @@ -70,7 +70,7 @@ public class PaySelectionCreateCheck extends SvrProcess */ protected String doIt () throws Exception { - log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID + if (log.isLoggable(Level.INFO)) log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID + ", PaymentRule=" + p_PaymentRule); MPaySelection psel = new MPaySelection (getCtx(), p_C_PaySelection_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java index 7a5ca69882..12ad769f87 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java @@ -95,7 +95,7 @@ public class PaySelectionCreateFrom extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID + if (log.isLoggable(Level.INFO)) log.info ("C_PaySelection_ID=" + p_C_PaySelection_ID + ", OnlyDiscount=" + p_OnlyDiscount + ", OnlyDue=" + p_OnlyDue + ", IncludeInDispute=" + p_IncludeInDispute + ", MatchRequirement=" + p_MatchRequirement diff --git a/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java b/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java index fa76de0a8e..4458c68407 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaymentOnline.java @@ -53,7 +53,7 @@ public class PaymentOnline extends SvrProcess */ protected String doIt() throws Exception { - log.info("Record_ID=" + getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info("Record_ID=" + getRecord_ID()); // get Payment MPayment pp = new MPayment (getCtx(), getRecord_ID(), get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java b/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java index c46bdf65ca..df9c2c2ffb 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaymentTermValidate.java @@ -53,7 +53,7 @@ public class PaymentTermValidate extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_PaymentTerm_ID=" + getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info ("C_PaymentTerm_ID=" + getRecord_ID()); MPaymentTerm pt = new MPaymentTerm (getCtx(), getRecord_ID(), get_TrxName()); String msg = pt.validate(); pt.saveEx(); diff --git a/org.adempiere.base.process/src/org/compiere/process/PeriodControlStatus.java b/org.adempiere.base.process/src/org/compiere/process/PeriodControlStatus.java index 63e4b49056..ad8e175c2e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PeriodControlStatus.java +++ b/org.adempiere.base.process/src/org/compiere/process/PeriodControlStatus.java @@ -58,7 +58,7 @@ public class PeriodControlStatus extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_PeriodControl_ID=" + p_C_PeriodControl_ID); + if (log.isLoggable(Level.INFO)) log.info ("C_PeriodControl_ID=" + p_C_PeriodControl_ID); MPeriodControl pc = new MPeriodControl (getCtx(), p_C_PeriodControl_ID, get_TrxName()); if (pc.get_ID() == 0) throw new AdempiereUserError("@NotFound@ @C_PeriodControl_ID@=" + p_C_PeriodControl_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/PeriodStatus.java b/org.adempiere.base.process/src/org/compiere/process/PeriodStatus.java index c765e98456..8c2caa4ed6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PeriodStatus.java +++ b/org.adempiere.base.process/src/org/compiere/process/PeriodStatus.java @@ -64,7 +64,7 @@ public class PeriodStatus extends SvrProcess */ protected String doIt() throws Exception { - log.info ("C_Period_ID=" + p_C_Period_ID + ", PeriodAction=" + p_PeriodAction); + if (log.isLoggable(Level.INFO)) log.info ("C_Period_ID=" + p_C_Period_ID + ", PeriodAction=" + p_PeriodAction); MPeriod period = new MPeriod (getCtx(), p_C_Period_ID, get_TrxName()); if (period.get_ID() == 0) throw new AdempiereUserError("@NotFound@ @C_Period_ID@=" + p_C_Period_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java b/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java index 093866f190..c9dbfcd231 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProductCategoryAcctCopy.java @@ -64,7 +64,7 @@ public class ProductCategoryAcctCopy extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID); + if (log.isLoggable(Level.INFO)) log.info("C_AcctSchema_ID=" + p_C_AcctSchema_ID); if (p_C_AcctSchema_ID == 0) throw new AdempiereSystemError("C_AcctSchema_ID=0"); MAcctSchema as = MAcctSchema.get(getCtx(), p_C_AcctSchema_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/ProductUOMConvert.java b/org.adempiere.base.process/src/org/compiere/process/ProductUOMConvert.java index 738ced691d..014017760c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProductUOMConvert.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProductUOMConvert.java @@ -81,7 +81,7 @@ public class ProductUOMConvert extends SvrProcess // MProduct product = MProduct.get(getCtx(), p_M_Product_ID); MProduct productTo = MProduct.get(getCtx(), p_M_Product_To_ID); - log.info("Product=" + product + ", ProductTo=" + productTo + if (log.isLoggable(Level.INFO)) log.info("Product=" + product + ", ProductTo=" + productTo + ", M_Locator_ID=" + p_M_Locator_ID + ", Qty=" + p_Qty); MUOMConversion[] conversions = MUOMConversion.getProductConversions(getCtx(), product.getM_Product_ID()); @@ -100,7 +100,7 @@ public class ProductUOMConvert extends SvrProcess if (qtyTo.compareTo(qtyTo6) != 0) throw new AdempiereUserError("@StdPrecision@: " + qtyTo + " <> " + qtyTo6 + " (" + p_Qty + "/" + conversion.getDivideRate() + ")"); - log.info(conversion + " -> " + qtyTo); + if (log.isLoggable(Level.INFO)) log.info(conversion + " -> " + qtyTo); // Set to Beta diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectGenOrder.java b/org.adempiere.base.process/src/org/compiere/process/ProjectGenOrder.java index 22200c032d..a48b9355f6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectGenOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectGenOrder.java @@ -60,7 +60,7 @@ public class ProjectGenOrder extends SvrProcess */ protected String doIt() throws Exception { - log.info("C_Project_ID=" + m_C_Project_ID); + if (log.isLoggable(Level.INFO)) log.info("C_Project_ID=" + m_C_Project_ID); if (m_C_Project_ID == 0) throw new IllegalArgumentException("C_Project_ID == 0"); MProject fromProject = getProject (getCtx(), m_C_Project_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java b/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java index 6892ef425d..f912a4835c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectGenPO.java @@ -75,7 +75,7 @@ public class ProjectGenPO extends SvrProcess */ protected String doIt() throws Exception { - log.info("doIt - C_Project_ID=" + m_C_Project_ID + " - C_ProjectLine_ID=" + m_C_ProjectLine_ID + " - Consolidate=" + m_ConsolidateDocument); + if (log.isLoggable(Level.INFO)) log.info("doIt - C_Project_ID=" + m_C_Project_ID + " - C_ProjectLine_ID=" + m_C_ProjectLine_ID + " - Consolidate=" + m_ConsolidateDocument); if (m_C_ProjectLine_ID != 0) { MProjectLine projectLine = new MProjectLine(getCtx(), m_C_ProjectLine_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java b/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java index d12f4e4ec8..08c14eb503 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java @@ -114,7 +114,7 @@ public class ProjectIssue extends SvrProcess if (!(MProject.PROJECTCATEGORY_WorkOrderJob.equals(m_project.getProjectCategory()) || MProject.PROJECTCATEGORY_AssetProject.equals(m_project.getProjectCategory()))) throw new IllegalArgumentException("Project not Work Order or Asset =" + m_project.getProjectCategory()); - log.info(m_project.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_project.toString()); // if (m_M_InOut_ID != 0) return issueReceipt(); @@ -137,7 +137,7 @@ public class ProjectIssue extends SvrProcess if (inOut.isSOTrx() || !inOut.isProcessed() || !(MInOut.DOCSTATUS_Completed.equals(inOut.getDocStatus()) || MInOut.DOCSTATUS_Closed.equals(inOut.getDocStatus()))) throw new IllegalArgumentException ("Receipt not valid - " + inOut); - log.info(inOut.toString()); + if (log.isLoggable(Level.INFO)) log.info(inOut.toString()); // Set Project of Receipt if (inOut.getC_Project_ID() == 0) { diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java index 965c36e2be..7d6357cd84 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java @@ -62,7 +62,7 @@ public class ProjectLinePricing extends SvrProcess if (m_C_ProjectLine_ID == 0) throw new IllegalArgumentException("No Project Line"); MProjectLine projectLine = new MProjectLine (getCtx(), m_C_ProjectLine_ID, get_TrxName()); - log.info("doIt - " + projectLine); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + projectLine); if (projectLine.getM_Product_ID() == 0) throw new IllegalArgumentException("No Product"); // diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java b/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java index 393641b9a8..83df04b42e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectPhaseGenOrder.java @@ -62,7 +62,7 @@ public class ProjectPhaseGenOrder extends SvrProcess protected String doIt() throws Exception { m_C_ProjectPhase_ID = getRecord_ID(); - log.info("doIt - C_ProjectPhase_ID=" + m_C_ProjectPhase_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - C_ProjectPhase_ID=" + m_C_ProjectPhase_ID); if (m_C_ProjectPhase_ID == 0) throw new IllegalArgumentException("C_ProjectPhase_ID == 0"); MProjectPhase fromPhase = new MProjectPhase (getCtx(), m_C_ProjectPhase_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectSetType.java b/org.adempiere.base.process/src/org/compiere/process/ProjectSetType.java index d28f78ae62..d9d1ac8726 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectSetType.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectSetType.java @@ -61,7 +61,7 @@ public class ProjectSetType extends SvrProcess protected String doIt() throws Exception { m_C_Project_ID = getRecord_ID(); - log.info("doIt - C_Project_ID=" + m_C_Project_ID + ", C_ProjectType_ID=" + m_C_ProjectType_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - C_Project_ID=" + m_C_Project_ID + ", C_ProjectType_ID=" + m_C_ProjectType_ID); // MProject project = new MProject (getCtx(), m_C_Project_ID, get_TrxName()); if (project.getC_Project_ID() == 0 || project.getC_Project_ID() != m_C_Project_ID) diff --git a/org.adempiere.base.process/src/org/compiere/process/Recurring.java b/org.adempiere.base.process/src/org/compiere/process/Recurring.java index 345539a8eb..51902ece95 100644 --- a/org.adempiere.base.process/src/org/compiere/process/Recurring.java +++ b/org.adempiere.base.process/src/org/compiere/process/Recurring.java @@ -52,7 +52,7 @@ public class Recurring extends SvrProcess protected String doIt() throws Exception { MRecurring rec = new MRecurring (getCtx(), getRecord_ID(), get_TrxName()); - log.info(rec.toString()); + if (log.isLoggable(Level.INFO)) log.info(rec.toString()); return rec.executeRun(); } // doIt diff --git a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java index b783036e42..efd066c2a3 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java +++ b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java @@ -61,7 +61,7 @@ public class RegisterSystem extends SvrProcess protected String doIt() throws Exception { int AD_Registration_ID = getRecord_ID(); - log.info("doIt - AD_Registration_ID=" + AD_Registration_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - AD_Registration_ID=" + AD_Registration_ID); // Check Ststem MSystem sys = MSystem.get(getCtx()); if (sys.getName().equals("?") || sys.getName().length()<2) @@ -148,7 +148,7 @@ public class RegisterSystem extends SvrProcess } // String info = sb.toString(); - log.info("Response=" + info); + if (log.isLoggable(Level.INFO)) log.info("Response=" + info); // Record at the end int index = sb.indexOf("Record_ID="); if (index != -1) diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java b/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java index 0f603f623c..4915e14b0c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java @@ -104,7 +104,7 @@ public class ReplenishReport extends SvrProcess .append(", C_BPartner_ID=").append(p_C_BPartner_ID) .append(" - ReplenishmentCreate=").append(p_ReplenishmentCreate) .append(", C_DocType_ID=").append(p_C_DocType_ID); - log.info(msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info(msglog.toString()); if (p_ReplenishmentCreate != null && p_C_DocType_ID == 0) throw new AdempiereUserError("@FillMandatory@ @C_DocType_ID@"); @@ -436,7 +436,7 @@ public class ReplenishReport extends SvrProcess line.saveEx(); } m_info = new StringBuffer("#").append(noOrders).append(info.toString()); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } // createPO /** @@ -482,7 +482,7 @@ public class ReplenishReport extends SvrProcess line.saveEx(); } m_info = new StringBuffer("#").append(noReqs).append(info.toString()); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } // createRequisition /** @@ -572,7 +572,7 @@ public class ReplenishReport extends SvrProcess else { m_info = new StringBuffer("#") .append(noMoves).append(info); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } } // Create Inventory Movements @@ -720,7 +720,7 @@ public class ReplenishReport extends SvrProcess else { m_info = new StringBuffer("#").append(noMoves).append(info); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } } // create Distribution Order diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java b/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java index 97efed83a4..6eb1fd8898 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java @@ -109,7 +109,7 @@ public class ReplenishReportProduction extends SvrProcess */ protected String doIt() throws Exception { - log.info("M_Warehouse_ID=" + p_M_Warehouse_ID + if (log.isLoggable(Level.INFO)) log.info("M_Warehouse_ID=" + p_M_Warehouse_ID + ", C_BPartner_ID=" + p_C_BPartner_ID +" - ReplenishmentCreate=" + p_ReplenishmentCreate + ", C_DocType_ID=" + p_C_DocType_ID); @@ -471,7 +471,7 @@ public class ReplenishReportProduction extends SvrProcess line.saveEx(); } m_info = new StringBuffer("#").append(noOrders).append(info.toString()); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } // createPO /** @@ -517,7 +517,7 @@ public class ReplenishReportProduction extends SvrProcess line.saveEx(); } m_info = new StringBuffer("#").append(noReqs).append(info.toString()); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } // createRequisition /** @@ -608,7 +608,7 @@ public class ReplenishReportProduction extends SvrProcess else { m_info = new StringBuffer("#").append(noMoves).append(info.toString()); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } } // Create Inventory Movements @@ -756,7 +756,7 @@ public class ReplenishReportProduction extends SvrProcess else { m_info = new StringBuffer("#").append(noMoves).append(info.toString()); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } } // create Distribution Order /** @@ -822,7 +822,7 @@ public class ReplenishReportProduction extends SvrProcess } m_info = new StringBuffer("#").append(noProds).append(info.toString()); - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); } // createRequisition /** diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java b/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java index d2d362ad05..eadb2aff64 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java @@ -99,7 +99,7 @@ public class ReplicationLocal extends SvrProcess if (m_system == null || !m_system.isValid()) return ("SystemNotSetupForReplication"); // - log.info("doIt - Record_ID=" + getRecord_ID() + ", test=" + m_test); + if (log.isLoggable(Level.INFO)) log.info("doIt - Record_ID=" + getRecord_ID() + ", test=" + m_test); connectRemote(); // setupRemote(); @@ -107,7 +107,7 @@ public class ReplicationLocal extends SvrProcess sendUpdates(); // Save Info - log.info("doIt - Replicated=" + m_replicated + " - " + m_replicationStart); + if (log.isLoggable(Level.INFO)) log.info("doIt - Replicated=" + m_replicated + " - " + m_replicationStart); m_replicationRun.setIsReplicated(m_replicated); double sec = (System.currentTimeMillis() - m_start); sec /= 1000; @@ -137,7 +137,7 @@ public class ReplicationLocal extends SvrProcess int AppsPort = m_replication.getHostPort(); CConnection connection = new CConnection(AppsHost); - log.info (AppsHost + ":" + AppsPort); + if (log.isLoggable(Level.INFO)) log.info (AppsHost + ":" + AppsPort); try { Server server = connection.getServer(); @@ -198,7 +198,7 @@ public class ReplicationLocal extends SvrProcess if (logs != null && logs.length > 0) dateRun = logs[0].getP_Date(); // User Remote Timestamp! // - log.info ("setupRemote - " + pi + " - Remote Timestamp = " + dateRun); + if (log.isLoggable(Level.INFO)) log.info ("setupRemote - " + pi + " - Remote Timestamp = " + dateRun); if (dateRun != null) m_replicationStart = dateRun; m_replicationRun = new MReplicationRun (getCtx(), m_replication.getAD_Replication_ID(), m_replicationStart, get_TrxName()); @@ -295,7 +295,7 @@ public class ReplicationLocal extends SvrProcess StringBuilder msg = new StringBuilder("< "); if (logs != null && logs.length > 0) msg.append(logs[0].getP_Msg()); // Remote Message - log.info("mergeDataTable - " + pi); + if (log.isLoggable(Level.INFO)) log.info("mergeDataTable - " + pi); // MReplicationLog rLog = new MReplicationLog (getCtx(), m_replicationRun.getAD_Replication_Run_ID(), AD_ReplicationTable_ID, msg.toString(), get_TrxName()); if (pi.isError()) @@ -488,7 +488,7 @@ public class ReplicationLocal extends SvrProcess pi.setSerializableObject(data); // send it pi = m_serverRemote.process (new Properties (), pi); - log.info("sendUpdatesTable - " + pi); + if (log.isLoggable(Level.INFO)) log.info("sendUpdatesTable - " + pi); ProcessInfoLog[] logs = pi.getLogs(); StringBuilder msg = new StringBuilder("> "); if (logs != null && logs.length > 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java b/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java index 7b63065728..42eb69af55 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplicationRemote.java @@ -65,7 +65,7 @@ public class ReplicationRemote extends SvrProcess public String doIt() throws Exception { ProcessInfo pi = getProcessInfo(); - log.info("doIt - " + pi.getTitle()); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + pi.getTitle()); if (pi.getSerializableObject() instanceof RemoteSetupVO) return setupRemote(); else if (pi.getSerializableObject() instanceof RemoteMergeDataVO) @@ -89,7 +89,7 @@ public class ReplicationRemote extends SvrProcess { ProcessInfo pi = getProcessInfo(); RemoteSetupVO data = (RemoteSetupVO)pi.getSerializableObject(); - log.info("setupRemote Start (" + pi + ") " + data); + if (log.isLoggable(Level.INFO)) log.info("setupRemote Start (" + pi + ") " + data); RowSet rs = data.ReplicationTable; try @@ -127,7 +127,7 @@ public class ReplicationRemote extends SvrProcess throw new Exception("setupRemote - Init Error - " + result); pi.setSerializableObject(null); pi.addLog(0,0, m_startDate, null, null); - log.info("setupRemote End (" + pi + ") " + data); + if (log.isLoggable(Level.INFO)) log.info("setupRemote End (" + pi + ") " + data); return "Remote SetupRemote OK"; } // setupRemote @@ -227,7 +227,7 @@ public class ReplicationRemote extends SvrProcess { ProcessInfo pi = getProcessInfo(); RemoteMergeDataVO data = (RemoteMergeDataVO)pi.getSerializableObject(); - log.info("mergeDataWithCentral Start (" + pi + ") " + data); + if (log.isLoggable(Level.INFO)) log.info("mergeDataWithCentral Start (" + pi + ") " + data); // Merge Data from Central RowSet sourceRS = data.CentralData; if (sourceRS == null) @@ -252,7 +252,7 @@ public class ReplicationRemote extends SvrProcess RowSet rowset = ReplicationLocal.getRowSet(data.Sql, null); // Result pi.setSerializableObject((Serializable)rowset); - log.info("mergeDataWithCentral End (" + pi + ") " + data); + if (log.isLoggable(Level.INFO)) log.info("mergeDataWithCentral End (" + pi + ") " + data); return "Remote MergeDataWithCentral - " + data.TableName; } // sendNewDataToCentral @@ -267,7 +267,7 @@ public class ReplicationRemote extends SvrProcess { ProcessInfo pi = getProcessInfo(); RemoteUpdateVO data = (RemoteUpdateVO)pi.getSerializableObject(); - log.info("receiveUpdateFromCentral Start (" + pi + ") - " + data); + if (log.isLoggable(Level.INFO)) log.info("receiveUpdateFromCentral Start (" + pi + ") - " + data); // RowSet sourceRS = data.CentralData; if (sourceRS == null) @@ -292,7 +292,7 @@ public class ReplicationRemote extends SvrProcess } // pi.setSerializableObject(null); - log.info("receiveUpdateFromCentral End (" + pi + ") - " + data); + if (log.isLoggable(Level.INFO)) log.info("receiveUpdateFromCentral End (" + pi + ") - " + data); return "Remote Receive Update from Central OK"; } // receiveUpdateFromCentral diff --git a/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java b/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java index c06985eb4b..efa34f1803 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReportColumnSet_Copy.java @@ -67,7 +67,7 @@ public class ReportColumnSet_Copy extends SvrProcess protected String doIt() throws Exception { int to_ID = super.getRecord_ID(); - log.info("From PA_ReportColumnSet_ID=" + m_PA_ReportColumnSet_ID + ", To=" + to_ID); + if (log.isLoggable(Level.INFO)) log.info("From PA_ReportColumnSet_ID=" + m_PA_ReportColumnSet_ID + ", To=" + to_ID); if (to_ID < 1) throw new Exception(MSG_SaveErrorRowNotFound); // diff --git a/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java b/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java index cd958bbbc0..eabecf13e8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReportLineSet_Copy.java @@ -68,7 +68,7 @@ public class ReportLineSet_Copy extends SvrProcess protected String doIt() throws Exception { int to_ID = super.getRecord_ID(); - log.info("From PA_ReportLineSet_ID=" + m_PA_ReportLineSet_ID + ", To=" + to_ID); + if (log.isLoggable(Level.INFO)) log.info("From PA_ReportLineSet_ID=" + m_PA_ReportLineSet_ID + ", To=" + to_ID); if (to_ID < 1) throw new Exception(MSG_SaveErrorRowNotFound); // diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java index 79f162f59f..d3ad0815c5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java @@ -133,7 +133,7 @@ public class RequestEMailProcessor extends SvrProcess */ protected String doIt() throws Exception { - log.info("doIt - IMAPHost=" + p_IMAPHost + + if (log.isLoggable(Level.INFO)) log.info("doIt - IMAPHost=" + p_IMAPHost + " IMAPUser=" + p_IMAPUser + // " IMAPPwd=" + p_IMAPPwd + " RequestFolder=" + p_RequestFolder + @@ -276,8 +276,8 @@ public class RequestEMailProcessor extends SvrProcess msg.setFlag(Flags.Flag.ANSWERED, true); requestFolder.appendMessages(new Message[]{msg}); // log movement - log.info("message " + hdrs[0] + " moved to " + p_RequestFolder + " folder"); - log.info("message info: Sent -> " + msg.getSentDate() + " From -> " + msg.getFrom()[0].toString()); + if (log.isLoggable(Level.INFO)) log.info("message " + hdrs[0] + " moved to " + p_RequestFolder + " folder"); + if (log.isLoggable(Level.INFO)) log.info("message info: Sent -> " + msg.getSentDate() + " From -> " + msg.getFrom()[0].toString()); // Delete in InBox msg.setFlag(Flags.Flag.DELETED, true); @SuppressWarnings("unused") @@ -286,7 +286,7 @@ public class RequestEMailProcessor extends SvrProcess noRequest++; } } catch (Exception e) { - log.info("message " + hdrs[0] + " threw error"); + if (log.isLoggable(Level.INFO)) log.info("message " + hdrs[0] + " threw error"); e.printStackTrace(); } } @@ -313,7 +313,7 @@ public class RequestEMailProcessor extends SvrProcess noProcessed++; } - log.info("processInBox - Total=" + noProcessed + + if (log.isLoggable(Level.INFO)) log.info("processInBox - Total=" + noProcessed + " - Requests=" + noRequest + " - Errors=" + noError); // Fini @@ -338,7 +338,7 @@ public class RequestEMailProcessor extends SvrProcess // Carlos Ruiz if (from[0].toString().indexOf('<')!= -1 && from[0].toString().indexOf('>')!= -1) { fromAddress = from[0].toString().substring(from[0].toString().indexOf('<')+1, from[0].toString().indexOf('>')); - log.info("fromAddress stripped: "+fromAddress); + if (log.isLoggable(Level.INFO)) log.info("fromAddress stripped: "+fromAddress); } else { fromAddress = from[0].toString(); } @@ -372,7 +372,7 @@ public class RequestEMailProcessor extends SvrProcess rsdup = null;pstmtdup = null; } if (retValuedup > 0) { - log.info("request already existed for msg -> " + hdrs[0]); + if (log.isLoggable(Level.INFO)) log.info("request already existed for msg -> " + hdrs[0]); return true; } @@ -424,7 +424,7 @@ public class RequestEMailProcessor extends SvrProcess rsupd = null;pstmtupd = null; } if (request_upd > 0) { - log.info("msg -> " + hdrs[0] + " is an answer for req " + request_upd); + if (log.isLoggable(Level.INFO)) log.info("msg -> " + hdrs[0] + " is an answer for req " + request_upd); return updateRequest(request_upd, msg); } @@ -514,7 +514,7 @@ public class RequestEMailProcessor extends SvrProcess } if (req.save(get_TrxName())) { - log.info("created request " + req.getR_Request_ID() + " from msg -> " + hdrs[0]); + if (log.isLoggable(Level.INFO)) log.info("created request " + req.getR_Request_ID() + " from msg -> " + hdrs[0]); // get simple attachments and attach to request diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java index 11a15339d8..a9ffa56052 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java @@ -89,7 +89,7 @@ public class RequestInvoice extends SvrProcess */ protected String doIt () throws Exception { - log.info("R_RequestType_ID=" + p_R_RequestType_ID + ", R_Group_ID=" + p_R_Group_ID + if (log.isLoggable(Level.INFO)) log.info("R_RequestType_ID=" + p_R_RequestType_ID + ", R_Group_ID=" + p_R_Group_ID + ", R_Category_ID=" + p_R_Category_ID + ", C_BPartner_ID=" + p_C_BPartner_ID + ", p_M_Product_ID=" + p_M_Product_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestReOpen.java b/org.adempiere.base.process/src/org/compiere/process/RequestReOpen.java index 6d34e43588..540aca3218 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestReOpen.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestReOpen.java @@ -59,7 +59,7 @@ public class RequestReOpen extends SvrProcess protected String doIt () throws Exception { MRequest request = new MRequest (getCtx(), p_R_Request_ID, get_TrxName()); - log.info(request.toString()); + if (log.isLoggable(Level.INFO)) log.info(request.toString()); if (request.get_ID() == 0) throw new AdempiereUserError("@NotFound@ @R_Request_ID@ " + p_R_Request_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java b/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java index 903db22504..8e2e26bf5a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java @@ -144,7 +144,7 @@ public class RequisitionPOCreate extends SvrProcess // Specific if (p_M_Requisition_ID != 0) { - log.info("M_Requisition_ID=" + p_M_Requisition_ID); + if (log.isLoggable(Level.INFO)) log.info("M_Requisition_ID=" + p_M_Requisition_ID); MRequisition req = new MRequisition(getCtx(), p_M_Requisition_ID, get_TrxName()); if (!MRequisition.DOCSTATUS_Completed.equals(req.getDocStatus())) { @@ -163,7 +163,7 @@ public class RequisitionPOCreate extends SvrProcess } // single Requisition // - log.info("AD_Org_ID=" + p_AD_Org_ID + if (log.isLoggable(Level.INFO)) log.info("AD_Org_ID=" + p_AD_Org_ID + ", M_Warehouse_ID=" + p_M_Warehouse_ID + ", DateDoc=" + p_DateDoc_From + "/" + p_DateDoc_To + ", DateRequired=" + p_DateRequired_From + "/" + p_DateRequired_To @@ -443,7 +443,7 @@ public class RequisitionPOCreate extends SvrProcess if (!isGenerateForVendor(C_BPartner_ID)) { - log.info("Skip for partner "+C_BPartner_ID); + if (log.isLoggable(Level.INFO)) log.info("Skip for partner "+C_BPartner_ID); return; } diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQClose.java b/org.adempiere.base.process/src/org/compiere/process/RfQClose.java index 03d3aff36d..ed1d7074b4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQClose.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQClose.java @@ -64,7 +64,7 @@ public class RfQClose extends SvrProcess MRfQ rfq = new MRfQ (getCtx(), p_C_RfQ_ID, get_TrxName()); if (rfq.get_ID() == 0) throw new IllegalArgumentException("No RfQ found"); - log.info("doIt - " + rfq); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + rfq); // rfq.setProcessed(true); rfq.saveEx(); diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java b/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java index 4057a4fa3a..17747e4877 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java @@ -63,7 +63,7 @@ public class RfQCopyLines extends SvrProcess */ protected String doIt () throws Exception { - log.info("doIt - From_RfQ_ID=" + p_From_RfQ_ID + ", To_RfQ_ID=" + p_To_RfQ_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - From_RfQ_ID=" + p_From_RfQ_ID + ", To_RfQ_ID=" + p_To_RfQ_ID); // MRfQ to = new MRfQ (getCtx(), p_To_RfQ_ID, get_TrxName()); if (to.get_ID() == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCreate.java b/org.adempiere.base.process/src/org/compiere/process/RfQCreate.java index 897e1dfb47..e36f80e8f3 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCreate.java @@ -63,7 +63,7 @@ public class RfQCreate extends SvrProcess protected String doIt() throws Exception { MRfQ rfq = new MRfQ (getCtx(), p_C_RfQ_ID, get_TrxName()); - log.info("doIt - " + rfq + ", Send=" + p_IsSendRfQ); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + rfq + ", Send=" + p_IsSendRfQ); String error = rfq.checkQuoteTotalAmtOnly(); if (error != null && error.length() > 0) throw new Exception (error); diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java b/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java index ea6fdd193f..27cbb991aa 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCreatePO.java @@ -78,7 +78,7 @@ public class RfQCreatePO extends SvrProcess MRfQ rfq = new MRfQ (getCtx(), p_C_RfQ_ID, get_TrxName()); if (rfq.get_ID() == 0) throw new IllegalArgumentException("No RfQ found"); - log.info(rfq.toString()); + if (log.isLoggable(Level.INFO)) log.info(rfq.toString()); // Complete MRfQResponse[] responses = rfq.getResponses(true, true); diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java b/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java index d8790d2fc2..1b3f69f812 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCreateSO.java @@ -79,7 +79,7 @@ public class RfQCreateSO extends SvrProcess MRfQ rfq = new MRfQ (getCtx(), p_C_RfQ_ID, get_TrxName()); if (rfq.get_ID() == 0) throw new IllegalArgumentException("No RfQ found"); - log.info("doIt - " + rfq); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + rfq); if (rfq.getC_BPartner_ID() == 0 || rfq.getC_BPartner_Location_ID() == 0) throw new Exception ("No Business Partner/Location"); diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java b/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java index 1f96e8cb79..52b302ecc9 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQResponseCComplete.java @@ -56,7 +56,7 @@ public class RfQResponseCComplete extends SvrProcess protected String doIt() throws Exception { MRfQResponse response = new MRfQResponse (getCtx(), p_C_RfQResponse_ID, get_TrxName()); - log.info("doIt - " + response); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + response); // String error = response.checkComplete(); if (error != null && error.length() > 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQResponseInvite.java b/org.adempiere.base.process/src/org/compiere/process/RfQResponseInvite.java index 449c4677d3..ce1e99653c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQResponseInvite.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQResponseInvite.java @@ -58,7 +58,7 @@ public class RfQResponseInvite extends SvrProcess protected String doIt() throws Exception { MRfQResponse response = new MRfQResponse (getCtx(), p_C_RfQResponse_ID, get_TrxName()); - log.info("doIt - " + response); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + response); String error = response.getRfQ().checkQuoteTotalAmtOnly(); if (error != null && error.length() > 0) throw new Exception (error); diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java b/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java index 0c4b43c3c9..42a53cf1b3 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQResponseRank.java @@ -75,7 +75,7 @@ public class RfQResponseRank extends SvrProcess MRfQ rfq = new MRfQ (getCtx(), p_C_RfQ_ID, get_TrxName()); if (rfq.get_ID() == 0) throw new IllegalArgumentException("No RfQ found"); - log.info(rfq.toString()); + if (log.isLoggable(Level.INFO)) log.info(rfq.toString()); String error = rfq.checkQuoteTotalAmtOnly(); if (error != null && error.length() > 0) throw new Exception (error); diff --git a/org.adempiere.base.process/src/org/compiere/process/RoleAccessUpdate.java b/org.adempiere.base.process/src/org/compiere/process/RoleAccessUpdate.java index 2085253cfd..a18c6b8018 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RoleAccessUpdate.java +++ b/org.adempiere.base.process/src/org/compiere/process/RoleAccessUpdate.java @@ -79,7 +79,7 @@ public class RoleAccessUpdate extends SvrProcess */ protected String doIt () throws Exception { - log.info("AD_Client_ID=" + p_AD_Client_ID + ", AD_Role_ID=" + p_AD_Role_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Client_ID=" + p_AD_Client_ID + ", AD_Role_ID=" + p_AD_Role_ID); // if (p_AD_Role_ID > 0) updateRole (new MRole (getCtx(), p_AD_Role_ID, get_TrxName())); diff --git a/org.adempiere.base.process/src/org/compiere/process/SendMailText.java b/org.adempiere.base.process/src/org/compiere/process/SendMailText.java index ee0e27a975..babd887342 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SendMailText.java +++ b/org.adempiere.base.process/src/org/compiere/process/SendMailText.java @@ -98,7 +98,7 @@ public class SendMailText extends SvrProcess */ protected String doIt() throws Exception { - log.info("R_MailText_ID=" + m_R_MailText_ID); + if (log.isLoggable(Level.INFO)) log.info("R_MailText_ID=" + m_R_MailText_ID); // Mail Test m_MailText = new MMailText (getCtx(), m_R_MailText_ID, get_TrxName()); if (m_MailText.getR_MailText_ID() == 0) @@ -134,7 +134,7 @@ public class SendMailText extends SvrProcess */ private void sendInterestArea() { - log.info("R_InterestArea_ID=" + m_R_InterestArea_ID); + if (log.isLoggable(Level.INFO)) log.info("R_InterestArea_ID=" + m_R_InterestArea_ID); m_ia = MInterestArea.get(getCtx(), m_R_InterestArea_ID); StringBuilder unsubscribe = null; if (m_ia.isSelfService()) @@ -204,7 +204,7 @@ public class SendMailText extends SvrProcess */ private void sendBPGroup() { - log.info("C_BP_Group_ID=" + m_C_BP_Group_ID); + if (log.isLoggable(Level.INFO)) log.info("C_BP_Group_ID=" + m_C_BP_Group_ID); String sql = "SELECT u.Name, u.EMail, u.AD_User_ID " + "FROM AD_User u" + " INNER JOIN C_BPartner bp ON (u.C_BPartner_ID=bp.C_BPartner_ID) " diff --git a/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java b/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java index 94f26940bc..0ac980a2ac 100644 --- a/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java +++ b/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java @@ -71,14 +71,14 @@ public class StorageCleanup extends SvrProcess + "WHERE QtyOnHand = 0" + " AND Created < SysDate-3"; int no = DB.executeUpdate(sql, get_TrxName()); - log.info("Delete Empty #" + no); + if (log.isLoggable(Level.INFO)) log.info("Delete Empty #" + no); // Clean up empty Reservation Storage sql = "DELETE FROM M_StorageReservation " + "WHERE Qty = 0" + " AND Created < SysDate-3"; no = DB.executeUpdate(sql, get_TrxName()); - log.info("Delete Empty #" + no); + if (log.isLoggable(Level.INFO)) log.info("Delete Empty #" + no); // sql = "SELECT * " @@ -134,7 +134,7 @@ public class StorageCleanup extends SvrProcess */ private int move (MStorageOnHand target) { - log.info(target.toString()); + if (log.isLoggable(Level.INFO)) log.info(target.toString()); BigDecimal qty = target.getQtyOnHand().negate(); // Create Movement diff --git a/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java b/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java index 3ec9b26bf5..799eb60434 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java +++ b/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java @@ -118,7 +118,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND AD_Element_ID || AD_LANGUAGE NOT IN " +" (SELECT AD_Element_ID || AD_LANGUAGE FROM AD_ELEMENT_TRL)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); log.info("Creating link from Element to Column"); @@ -128,7 +128,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE UPPER(c.ColumnName)=UPPER(e.ColumnName))" +" WHERE AD_Element_ID IS NULL"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); log.info("Deleting unused Elements"); @@ -140,7 +140,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND NOT EXISTS" +" (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(e.ColumnName)=UPPER(p.ColumnName)))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows deleted: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows deleted: "+no); trx.commit(true); sql="DELETE AD_ELEMENT e" @@ -149,7 +149,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND NOT EXISTS" +" (SELECT 1 FROM AD_PROCESS_PARA p WHERE UPPER(e.ColumnName)=UPPER(p.ColumnName))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows deleted: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows deleted: "+no); trx.commit(true); // Columns @@ -164,7 +164,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND (c.ColumnName <> e.ColumnName OR c.Name <> e.Name " +" OR NVL(c.Description,' ') <> NVL(e.Description,' ') OR NVL(c.Help,' ') <> NVL(e.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Fields should now be synchronized @@ -181,7 +181,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL" +" AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Field Translations @@ -208,7 +208,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'" +" AND (trl.Name <> e.Name OR NVL(trl.Description,' ') <> NVL(e.Description,' ') OR NVL(trl.Help,' ') <> NVL(e.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Fields should now be synchronized @@ -232,7 +232,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND t.AD_Window_ID=w.AD_Window_ID" +" AND w.IsSOTrx='N')"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Field Translations @@ -265,7 +265,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND t.AD_Window_ID=w.AD_Window_ID" +" AND w.IsSOTrx='N')"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Fields from Process @@ -283,7 +283,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID" +" AND (f.Name<>p.Name OR NVL(f.Description,' ')<>NVL(p.Description,' ') OR NVL(f.Help,' ')<>NVL(p.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Field Translations from Process @@ -308,7 +308,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'" +" AND (trl.Name<>p.Name OR NVL(trl.Description,' ')<>NVL(p.Description,' ') OR NVL(trl.Help,' ')<>NVL(p.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Sync Parameter ColumnName @@ -321,7 +321,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE UPPER(e.ColumnName)=UPPER(f.ColumnName)" +" AND e.ColumnName<>f.ColumnName)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Parameter Fields @@ -330,7 +330,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE IsCentrallyMaintained <> 'N'" +" AND NOT EXISTS (SELECT 1 FROM AD_ELEMENT e WHERE p.ColumnName=e.ColumnName)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Parameter Fields @@ -348,7 +348,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE e.ColumnName=f.ColumnName" +" AND (f.Name <> e.Name OR NVL(f.Description,' ') <> NVL(e.Description,' ') OR NVL(f.Help,' ') <> NVL(e.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Parameter Translations @@ -373,7 +373,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'" +" AND (trl.Name <> et.Name OR NVL(trl.Description,' ') <> NVL(et.Description,' ') OR NVL(trl.Help,' ') <> NVL(et.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Workflow Node - Window @@ -390,7 +390,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE w.AD_Window_ID=n.AD_Window_ID" +" AND (w.Name <> n.Name OR NVL(w.Description,' ') <> NVL(n.Description,' ') OR NVL(w.Help,' ') <> NVL(n.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Workflow Translations - Window @@ -410,7 +410,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y'" +" AND (trl.Name <> t.Name OR NVL(trl.Description,' ') <> NVL(t.Description,' ') OR NVL(trl.Help,' ') <> NVL(t.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Workflow Node - Form @@ -424,7 +424,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE f.AD_Form_ID=n.AD_Form_ID" +" AND (f.Name <> n.Name OR NVL(f.Description,' ') <> NVL(n.Description,' ') OR NVL(f.Help,' ') <> NVL(n.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Workflow Translations - Form @@ -439,7 +439,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y'" +" AND (trl.Name <> t.Name OR NVL(trl.Description,' ') <> NVL(t.Description,' ') OR NVL(trl.Help,' ') <> NVL(t.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Workflow Node - Report @@ -453,7 +453,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE f.AD_Process_ID=n.AD_Process_ID" +" AND (f.Name <> n.Name OR NVL(f.Description,' ') <> NVL(n.Description,' ') OR NVL(f.Help,' ') <> NVL(n.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Workflow Translations - Form @@ -468,7 +468,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND trl.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y'" +" AND (trl.Name <> t.Name OR NVL(trl.Description,' ') <> NVL(t.Description,' ') OR NVL(trl.Help,' ') <> NVL(t.Help,' ')))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Need centrally maintained flag here! @@ -487,7 +487,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND EXISTS (SELECT 1 FROM AD_CLIENT" +" WHERE AD_Client_ID=pfi.AD_Client_ID AND IsMultiLingualDocument='Y')"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); log.info("Synchronize PrintFormatItem PrintName from Element"); @@ -508,7 +508,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND EXISTS (SELECT 1 FROM AD_CLIENT " +" WHERE AD_Client_ID=pfi.AD_Client_ID AND IsMultiLingualDocument='Y')"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); log.info("Synchronize PrintFormatItem Trl Name from Element"); @@ -525,7 +525,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND p.IsCentrallyMaintained='Y' AND p.IsActive='Y'" +" AND (trl.Name <> e.Name))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); log.info("Synchronize PrintFormatItem Trl from Element Trl (Multi-Lingual)"); @@ -550,7 +550,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND EXISTS (SELECT 1 FROM AD_CLIENT " +" WHERE AD_Client_ID=trl.AD_Client_ID AND IsMultiLingualDocument='Y')"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); log.info("Synchronize PrintFormatItem Trl (Not Multi-Lingual)"); @@ -569,7 +569,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND EXISTS (SELECT 1 FROM AD_CLIENT " +" WHERE AD_Client_ID=trl.AD_Client_ID AND IsMultiLingualDocument='N')"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); log.info("Reset PrintFormatItem Trl where not used in base table"); @@ -582,7 +582,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND pfi.IsCentrallyMaintained='Y'" +" AND (LENGTH (pfi.PrintName) = 0 OR pfi.PrintName IS NULL))"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); /** @@ -604,7 +604,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" ; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); sql="UPDATE AD_MENU_TRL mt" @@ -625,7 +625,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" +")"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Sync Names - Process @@ -638,7 +638,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" ; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); sql="UPDATE AD_MENU_TRL mt" @@ -659,7 +659,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" +")"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Sync Names = Form @@ -672,7 +672,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" ; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); sql="UPDATE AD_MENU_TRL mt" @@ -693,7 +693,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" +")"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Sync Names - Workflow @@ -706,7 +706,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" ; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); sql="UPDATE AD_MENU_TRL mt" @@ -727,7 +727,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" +")"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Sync Names = Task @@ -740,7 +740,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" ; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); sql="UPDATE AD_MENU_TRL mt" @@ -761,7 +761,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND m.IsCentrallyMaintained='Y' AND m.IsActive='Y'" +")"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Column Name + Element @@ -775,7 +775,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE c.AD_Element_ID=e.AD_Element_ID" +" AND c.Name<>e.Name)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); sql="UPDATE AD_COLUMN_TRL ct" +" SET Name = (SELECT e.Name" +" FROM AD_COLUMN c INNER JOIN AD_ELEMENT_TRL e ON (c.AD_Element_ID=e.AD_Element_ID)" @@ -785,7 +785,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE ct.AD_Column_ID=c.AD_Column_ID AND ct.AD_LANGUAGE=e.AD_LANGUAGE" +" AND ct.Name<>e.Name)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); // Table Name + Element @@ -799,7 +799,7 @@ public class SynchronizeTerminology extends SvrProcess no = DB.executeUpdate(sql, false, get_TrxName()); trx.commit(true); - log.info(" rows updated: " +no); + if (log.isLoggable(Level.INFO)) log.info(" rows updated: " +no); sql="UPDATE AD_TABLE_TRL tt" +" SET Name = (SELECT e.Name " +" FROM AD_TABLE t INNER JOIN AD_ELEMENT ex ON (t.TableName||'_ID'=ex.ColumnName)" @@ -811,7 +811,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE tt.AD_Table_ID=t.AD_Table_ID AND tt.AD_LANGUAGE=e.AD_LANGUAGE" +" AND tt.Name<>e.Name)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" trl rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" trl rows updated: "+no); trx.commit(true); // Trl Table Name + Element @@ -824,7 +824,7 @@ public class SynchronizeTerminology extends SvrProcess +" WHERE SUBSTR(t.TableName,1,LENGTH(t.TableName)-4)||'_ID'=e.ColumnName" +" AND t.Name<>e.Name)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" trl rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" trl rows updated: "+no); trx.commit(true); sql=" UPDATE AD_TABLE_TRL tt" @@ -839,7 +839,7 @@ public class SynchronizeTerminology extends SvrProcess +" AND t.TableName LIKE '%_Trl'" +" AND tt.Name<>e.Name)"; no = DB.executeUpdate(sql, false, get_TrxName()); - log.info(" trl rows updated: "+no); + if (log.isLoggable(Level.INFO)) log.info(" trl rows updated: "+no); trx.commit(true); } catch (Exception e) { diff --git a/org.adempiere.base.process/src/org/compiere/process/TabCopy.java b/org.adempiere.base.process/src/org/compiere/process/TabCopy.java index f56cab2f86..b2f34cd1b7 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TabCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/TabCopy.java @@ -62,7 +62,7 @@ public class TabCopy extends SvrProcess */ protected String doIt() throws Exception { - log.info("To AD_Tab_ID=" + p_AD_TabTo_ID + ", From=" + p_AD_TabFrom_ID); + if (log.isLoggable(Level.INFO)) log.info("To AD_Tab_ID=" + p_AD_TabTo_ID + ", From=" + p_AD_TabFrom_ID); MTab from = new MTab (getCtx(), p_AD_TabFrom_ID, get_TrxName()); if (from.get_ID() == 0) throw new AdempiereUserError("@NotFound@ (from->) @AD_Tab_ID@"); diff --git a/org.adempiere.base.process/src/org/compiere/process/TabCreateFields.java b/org.adempiere.base.process/src/org/compiere/process/TabCreateFields.java index a188ed56e4..bcf884fdc8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TabCreateFields.java +++ b/org.adempiere.base.process/src/org/compiere/process/TabCreateFields.java @@ -65,7 +65,7 @@ public class TabCreateFields extends SvrProcess MTab tab = new MTab (getCtx(), p_AD_Tab_ID, get_TrxName()); if (p_AD_Tab_ID == 0 || tab == null || tab.get_ID() == 0) throw new AdempiereSystemError("@NotFound@: @AD_Tab_ID@ " + p_AD_Tab_ID); - log.info(tab.toString()); + if (log.isLoggable(Level.INFO)) log.info(tab.toString()); // int count = 0; String sql = "SELECT * FROM AD_Column c " diff --git a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java index 3423884e16..ee042d0867 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java +++ b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java @@ -85,7 +85,7 @@ public class TableCreateColumns extends SvrProcess { if (p_AD_Table_ID == 0) throw new AdempiereSystemError("@NotFound@ @AD_Table_ID@ " + p_AD_Table_ID); - log.info("EntityType=" + p_EntityType + if (log.isLoggable(Level.INFO)) log.info("EntityType=" + p_EntityType + ", AllTables=" + p_AllTables + ", AD_Table_ID=" + p_AD_Table_ID); // @@ -105,7 +105,7 @@ public class TableCreateColumns extends SvrProcess MTable table = new MTable (getCtx(), p_AD_Table_ID, get_TrxName()); if (table == null || table.get_ID() == 0) throw new AdempiereSystemError("@NotFound@ @AD_Table_ID@ " + p_AD_Table_ID); - log.info(table.getTableName() + ", EntityType=" + p_EntityType); + if (log.isLoggable(Level.INFO)) log.info(table.getTableName() + ", EntityType=" + p_EntityType); String tableName = table.getTableName(); if (DB.isOracle()) tableName = tableName.toUpperCase(); @@ -171,7 +171,7 @@ public class TableCreateColumns extends SvrProcess continue; } // - log.info(tableName + " - " + tableType); + if (log.isLoggable(Level.INFO)) log.info(tableName + " - " + tableType); // Create New table = new MTable(getCtx(), 0, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java b/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java index cba02bf852..380b6c41b7 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/TaxDeclarationCreate.java @@ -76,7 +76,7 @@ public class TaxDeclarationCreate extends SvrProcess */ protected String doIt () throws Exception { - log.info("C_TaxDeclaration_ID=" + p_C_TaxDeclaration_ID); + if (log.isLoggable(Level.INFO)) log.info("C_TaxDeclaration_ID=" + p_C_TaxDeclaration_ID); m_td = new MTaxDeclaration (getCtx(), p_C_TaxDeclaration_ID, get_TrxName()); if (m_td.get_ID() == 0) throw new AdempiereSystemError("@NotFound@ @C_TaxDeclaration_ID@ = " + p_C_TaxDeclaration_ID); diff --git a/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java b/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java index d334afa0e8..71e661a3e1 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java +++ b/org.adempiere.base.process/src/org/compiere/process/TransactionXRef.java @@ -63,7 +63,7 @@ public class TransactionXRef extends SvrProcess */ protected String doIt () throws Exception { - log.info("M_InOut_ID=" + p_Search_InOut_ID + ", C_Order_ID=" + p_Search_Order_ID + if (log.isLoggable(Level.INFO)) log.info("M_InOut_ID=" + p_Search_InOut_ID + ", C_Order_ID=" + p_Search_Order_ID + ", C_Invoice_ID=" + p_Search_Invoice_ID); // if (p_Search_InOut_ID != 0){ diff --git a/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java b/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java index 04b4eab8ec..b4b2d9096a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java +++ b/org.adempiere.base.process/src/org/compiere/process/TranslationDocSync.java @@ -64,7 +64,7 @@ public class TranslationDocSync extends SvrProcess if (client.isMultiLingualDocument()) throw new AdempiereUserError("@AD_Client_ID@: @IsMultiLingualDocument@"); // - log.info("" + client); + if (log.isLoggable(Level.INFO)) log.info("" + client); String sql = "SELECT * FROM AD_Table " + "WHERE TableName LIKE '%_Trl' AND TableName NOT LIKE 'AD%' " + "ORDER BY TableName"; diff --git a/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java b/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java index f7081dc8d4..feeb28d15a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java +++ b/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java @@ -65,7 +65,7 @@ public class TreeMaintenance extends SvrProcess */ protected String doIt() throws Exception { - log.info("AD_Tree_ID=" + m_AD_Tree_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Tree_ID=" + m_AD_Tree_ID); if (m_AD_Tree_ID == 0) throw new IllegalArgumentException("Tree_ID = 0"); MTree tree = new MTree (getCtx(), m_AD_Tree_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/UserPassword.java b/org.adempiere.base.process/src/org/compiere/process/UserPassword.java index 31164246ab..3af1564faf 100644 --- a/org.adempiere.base.process/src/org/compiere/process/UserPassword.java +++ b/org.adempiere.base.process/src/org/compiere/process/UserPassword.java @@ -77,7 +77,7 @@ public class UserPassword extends SvrProcess */ protected String doIt() throws Exception { - log.info ("AD_User_ID=" + p_AD_User_ID + " from " + getAD_User_ID()); + if (log.isLoggable(Level.INFO)) log.info ("AD_User_ID=" + p_AD_User_ID + " from " + getAD_User_ID()); MUser user = MUser.get(getCtx(), p_AD_User_ID); user.load(get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/VoidOnlineAuthorizationPaymentTransaction.java b/org.adempiere.base.process/src/org/compiere/process/VoidOnlineAuthorizationPaymentTransaction.java index 6fcc20758a..a6faa96834 100644 --- a/org.adempiere.base.process/src/org/compiere/process/VoidOnlineAuthorizationPaymentTransaction.java +++ b/org.adempiere.base.process/src/org/compiere/process/VoidOnlineAuthorizationPaymentTransaction.java @@ -24,7 +24,7 @@ public class VoidOnlineAuthorizationPaymentTransaction extends SvrProcess { protected String doIt() throws Exception { - log.info("Record_ID=" + getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info("Record_ID=" + getRecord_ID()); // get Payment MPaymentTransaction pt = new MPaymentTransaction (getCtx(), getRecord_ID(), get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java b/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java index 686ad1cc28..33bb61b820 100644 --- a/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/WindowCopy.java @@ -63,7 +63,7 @@ public class WindowCopy extends SvrProcess */ protected String doIt() throws Exception { - log.info("doIt - To AD_Window_ID=" + p_AD_WindowTo_ID + ", From=" + p_AD_WindowFrom_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - To AD_Window_ID=" + p_AD_WindowTo_ID + ", From=" + p_AD_WindowFrom_ID); MWindow from = new MWindow (getCtx(), p_AD_WindowFrom_ID, get_TrxName()); if (from.get_ID() == 0) throw new AdempiereUserError("@NotFound@ (from->) @AD_Window_ID@"); diff --git a/org.adempiere.base.process/src/org/compiere/process/YearCreatePeriods.java b/org.adempiere.base.process/src/org/compiere/process/YearCreatePeriods.java index d5b7c1f210..a867a58420 100644 --- a/org.adempiere.base.process/src/org/compiere/process/YearCreatePeriods.java +++ b/org.adempiere.base.process/src/org/compiere/process/YearCreatePeriods.java @@ -67,7 +67,7 @@ public class YearCreatePeriods extends SvrProcess MYear year = new MYear (getCtx(), p_C_Year_ID, get_TrxName()); if (p_C_Year_ID == 0 || year.get_ID() != p_C_Year_ID) throw new AdempiereUserError ("@NotFound@: @C_Year_ID@ - " + p_C_Year_ID); - log.info(year.toString()); + if (log.isLoggable(Level.INFO)) log.info(year.toString()); // if (year.createStdPeriods(null, p_StartDate, p_DateFormat)) return "@OK@"; diff --git a/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java b/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java index c79bc3e0b1..27596cb91d 100644 --- a/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java +++ b/org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java @@ -71,7 +71,7 @@ public class DepositBatchClose extends SvrProcess protected String doIt() throws Exception { MDepositBatch depositbatch = new MDepositBatch (getCtx(), m_X_DepositBatch_ID, get_TrxName()); - log.info("doIt - " + depositbatch); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + depositbatch); MDepositBatchLine[] depositbatchLines = depositbatch.getLines(); diff --git a/org.adempiere.base/src/org/adempiere/process/ShipperCopyFrom.java b/org.adempiere.base/src/org/adempiere/process/ShipperCopyFrom.java index 94f33da1e4..9c24561fa9 100644 --- a/org.adempiere.base/src/org/adempiere/process/ShipperCopyFrom.java +++ b/org.adempiere.base/src/org/adempiere/process/ShipperCopyFrom.java @@ -34,7 +34,7 @@ public class ShipperCopyFrom extends SvrProcess protected String doIt() throws Exception { int To_X_Shipper_ID = getRecord_ID(); - log.info("From X_Shipper_ID=" + p_X_Shipper_ID + " to " + To_X_Shipper_ID); + if (log.isLoggable(Level.INFO)) log.info("From X_Shipper_ID=" + p_X_Shipper_ID + " to " + To_X_Shipper_ID); if (To_X_Shipper_ID == 0) throw new IllegalArgumentException("Target X_Shipper_ID == 0"); if (p_X_Shipper_ID == 0) diff --git a/org.adempiere.base/src/org/adempiere/util/GenerateModel.java b/org.adempiere.base/src/org/adempiere/util/GenerateModel.java index e3a17b0866..0158db0e8b 100644 --- a/org.adempiere.base/src/org/adempiere/util/GenerateModel.java +++ b/org.adempiere.base/src/org/adempiere/util/GenerateModel.java @@ -84,7 +84,7 @@ public class GenerateModel System.err.println("No Directory"); System.exit(1); } - log.info("Directory: " + directory); + if (log.isLoggable(Level.INFO)) log.info("Directory: " + directory); // second parameter String packageName = "compiere.model"; @@ -95,7 +95,7 @@ public class GenerateModel System.err.println("No package"); System.exit(1); } - log.info("Package: " + packageName); + if (log.isLoggable(Level.INFO)) log.info("Package: " + packageName); // third parameter String entityType = "'U','A'"; // User, Application @@ -116,7 +116,7 @@ public class GenerateModel // tableLike = "'AD_OrgInfo', 'AD_Role', 'C_CashLine', 'C_Currency', 'C_Invoice', 'C_Order', 'C_Payment', 'M_InventoryLine', 'M_PriceList', 'M_Product', 'U_POSTerminal'"; // Only specific tables if (args.length > 3) tableLike = args[3]; - log.info("Table Like: " + tableLike); + if (log.isLoggable(Level.INFO)) log.info("Table Like: " + tableLike); // complete sql sql.insert(0, "SELECT AD_Table_ID " @@ -156,7 +156,7 @@ public class GenerateModel DB.close(rs, pstmt); rs = null; pstmt = null; } - log.info("Generated = " + count); + if (log.isLoggable(Level.INFO)) log.info("Generated = " + count); } } diff --git a/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java b/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java index ad2aadad6c..951508ba5c 100755 --- a/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java +++ b/org.adempiere.base/src/org/adempiere/util/GenerateModelJPA.java @@ -694,7 +694,7 @@ public class GenerateModelJPA fw.close (); float size = out.length(); size /= 1024; - log.info(out.getAbsolutePath() + " - " + size + " kB"); + if (log.isLoggable(Level.INFO)) log.info(out.getAbsolutePath() + " - " + size + " kB"); } catch (Exception ex) { @@ -744,7 +744,7 @@ public class GenerateModelJPA System.err.println("No Directory"); System.exit(1); } - log.info("Directory: " + directory); + if (log.isLoggable(Level.INFO)) log.info("Directory: " + directory); // second parameter String packageName = "adempiere.model"; @@ -755,7 +755,7 @@ public class GenerateModelJPA System.err.println("No package"); System.exit(1); } - log.info("Package: " + packageName); + if (log.isLoggable(Level.INFO)) log.info("Package: " + packageName); // third parameter String entityType = "'U','A','D'"; // User, Application @@ -768,7 +768,7 @@ public class GenerateModelJPA } StringBuffer sql = new StringBuffer("EntityType IN (") .append(entityType).append(")"); - log.info(sql.toString()); + if (log.isLoggable(Level.INFO)) log.info(sql.toString()); log.info("----------------------------------"); // complete sql @@ -803,7 +803,7 @@ public class GenerateModelJPA rs = null; pstmt = null; } - log.info("Generated = " + count); + if (log.isLoggable(Level.INFO)) log.info("Generated = " + count); } // main diff --git a/org.adempiere.base/src/org/compiere/Adempiere.java b/org.adempiere.base/src/org/compiere/Adempiere.java index 93b4753508..777daf19b3 100644 --- a/org.adempiere.base/src/org/compiere/Adempiere.java +++ b/org.adempiere.base/src/org/compiere/Adempiere.java @@ -501,7 +501,7 @@ public final class Adempiere // Init Log log = CLogger.getCLogger(Adempiere.class); // Greeting - log.info(getSummaryAscii()); + if (log.isLoggable(Level.INFO)) log.info(getSummaryAscii()); // log.info(getAdempiereHome() + " - " + getJavaInfo() + " - " + getOSInfo()); // Load System environment diff --git a/org.adempiere.base/src/org/compiere/MigrateData.java b/org.adempiere.base/src/org/compiere/MigrateData.java index f9bf24b452..f2dd0cf1b2 100644 --- a/org.adempiere.base/src/org/compiere/MigrateData.java +++ b/org.adempiere.base/src/org/compiere/MigrateData.java @@ -112,7 +112,7 @@ public class MigrateData rs = null; pstmt = null; } - log.info("#" + count); + if (log.isLoggable(Level.INFO)) log.info("#" + count); } // release252c diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java index b7f0579adc..a54ab8ba14 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc.java @@ -451,10 +451,9 @@ public abstract class Doc sql.append(" AND (Processing='N' OR Processing IS NULL)"); if (!repost) sql.append(" AND Posted='N'"); - if (DB.executeUpdate(sql.toString(), trxName) == 1) - log.info("Locked: " + get_TableName() + "_ID=" + get_ID()); - else - { + if (DB.executeUpdate(sql.toString(), trxName) == 1) { + if (log.isLoggable(Level.INFO)) log.info("Locked: " + get_TableName() + "_ID=" + get_ID()); + } else { log.log(Level.SEVERE, "Resubmit - Cannot lock " + get_TableName() + "_ID=" + get_ID() + ", Force=" + force + ",RePost=" + repost); if (!p_po.isActive()) @@ -611,7 +610,7 @@ public abstract class Doc .append(" AND C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID()); int no = DB.executeUpdate(sql.toString(), getTrxName()); if (no != 0) - log.info("deleted=" + no); + if (log.isLoggable(Level.INFO)) log.info("deleted=" + no); return no; } // deleteAcct @@ -699,7 +698,7 @@ public abstract class Doc */ private final String postCommit (String status) { - log.info("Sta=" + status + " DT=" + getDocumentType() + if (log.isLoggable(Level.INFO)) log.info("Sta=" + status + " DT=" + getDocumentType() + " ID=" + p_po.get_ID()); p_Status = status; diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java index 77e474fb19..f475d95b8d 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java @@ -846,7 +846,7 @@ public class Doc_AllocationHdr extends Doc DocLine_Allocation line, MAccount DiscountAccount, MAccount WriteOffAccoint, boolean isSOTrx) { - log.info (line.toString()); + if (log.isLoggable(Level.INFO)) log.info (line.toString()); BigDecimal discount = Env.ZERO; if (as.isTaxCorrectionDiscount()) discount = line.getDiscountAmt(); @@ -978,7 +978,7 @@ class Doc_AllocationTax } MFactAcct factAcct = (MFactAcct)m_facts.get(m_totalIndex); - log.info ("Total Invoice = " + total + " - " + factAcct); + if (log.isLoggable(Level.INFO)) log.info ("Total Invoice = " + total + " - " + factAcct); int precision = as.getStdPrecision(); for (int i = 0; i < m_facts.size(); i++) { @@ -987,7 +987,7 @@ class Doc_AllocationTax continue; factAcct = (MFactAcct)m_facts.get(i); - log.info (i + ": " + factAcct); + if (log.isLoggable(Level.INFO)) log.info (i + ": " + factAcct); // Create Tax Account MAccount taxAcct = factAcct.getMAccount(); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Production.java b/org.adempiere.base/src/org/compiere/acct/Doc_Production.java index febaad86f8..0f0e2b9a98 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Production.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Production.java @@ -95,7 +95,7 @@ public class Doc_Production extends Doc X_M_ProductionLine line = new X_M_ProductionLine(getCtx(), rsPL, getTrxName()); if (line.getMovementQty().signum() == 0) { - log.info("LineQty=0 - " + line); + if (log.isLoggable(Level.INFO)) log.info("LineQty=0 - " + line); continue; } DocLine docLine = new DocLine (line, this); diff --git a/org.adempiere.base/src/org/compiere/acct/Fact.java b/org.adempiere.base/src/org/compiere/acct/Fact.java index 864a507cf5..d731e023b5 100644 --- a/org.adempiere.base/src/org/compiere/acct/Fact.java +++ b/org.adempiere.base/src/org/compiere/acct/Fact.java @@ -118,7 +118,7 @@ public final class Fact // Data Check if (account == null) { - log.info("No account for " + docLine + if (log.isLoggable(Level.INFO)) log.info("No account for " + docLine + ": Amt=" + debitAmt + "/" + creditAmt + " - " + toString()); return null; @@ -442,7 +442,7 @@ public final class Fact { Integer key = keys.next(); Balance difference = map.get(key); - log.info (elementType + "=" + key + ", " + difference); + if (log.isLoggable(Level.INFO)) log.info (elementType + "=" + key + ", " + difference); // if (!difference.isZeroBalance()) { @@ -717,7 +717,7 @@ public final class Fact if (distribution.isCreateReversal()) { // Add Reversal FactLine reversal = dLine.reverse(distribution.getName()); - log.info("Reversal=" + reversal); + if (log.isLoggable(Level.INFO)) log.info("Reversal=" + reversal); newLines.add(reversal); // saved in postCommit } else { // delete the line being distributed @@ -781,7 +781,7 @@ public final class Fact description += " - " + dl.getDescription(); factLine.addDescription(description); // - log.info(factLine.toString()); + if (log.isLoggable(Level.INFO)) log.info(factLine.toString()); newLines.add(factLine); } } // for all lines diff --git a/org.adempiere.base/src/org/compiere/cm/CStageValidate.java b/org.adempiere.base/src/org/compiere/cm/CStageValidate.java index 52c5e220e7..38c79269b9 100644 --- a/org.adempiere.base/src/org/compiere/cm/CStageValidate.java +++ b/org.adempiere.base/src/org/compiere/cm/CStageValidate.java @@ -57,7 +57,7 @@ public class CStageValidate extends SvrProcess protected String doIt () throws Exception { - log.info("CM_CStage_ID=" + p_CM_CStage_ID); + if (log.isLoggable(Level.INFO)) log.info("CM_CStage_ID=" + p_CM_CStage_ID); MCStage stage = new MCStage (getCtx(), p_CM_CStage_ID, get_TrxName()); return stage.validate(); } // doIt diff --git a/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java b/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java index def163996d..440510991e 100644 --- a/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java +++ b/org.adempiere.base/src/org/compiere/cm/WebProjectDeploy.java @@ -80,7 +80,7 @@ public class WebProjectDeploy extends SvrProcess { org.compiere.cm.CacheHandler thisHandler = new org.compiere.cm.CacheHandler(org.compiere.cm.CacheHandler.convertJNPURLToCacheURL(getCtx().getProperty("java.naming.provider.url")), log, getCtx(), get_TrxName()); - log.info("CM_WebProject_ID=" + p_CM_WebProject_ID); + if (log.isLoggable(Level.INFO)) log.info("CM_WebProject_ID=" + p_CM_WebProject_ID); m_project = new MWebProject(getCtx(), p_CM_WebProject_ID, get_TrxName()); if (m_project.get_ID() != p_CM_WebProject_ID) throw new AdempiereUserError("@NotFound@ @CM_WebProject_ID@ " + p_CM_WebProject_ID); diff --git a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java index 29e464ebc1..a45266bf2c 100644 --- a/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java +++ b/org.adempiere.base/src/org/compiere/db/CreateAdempiere.java @@ -71,7 +71,7 @@ public class CreateAdempiere else m_databasePort = databasePort; m_systemPassword = systemPassword; - log.info(m_dbTarget.getName() + " on " + databaseHost); + if (log.isLoggable(Level.INFO)) log.info(m_dbTarget.getName() + " on " + databaseHost); } // create /** Adempiere Target Database */ @@ -173,7 +173,7 @@ public class CreateAdempiere { String dbUrl = m_dbTarget.getConnectionURL (m_databaseHost, m_databasePort, m_databaseName, m_dbTarget.getSystemUser()); // adempiere may not be defined yet - log.info(dbUrl + " - " + m_dbTarget.getSystemUser() + "/" + m_systemPassword); + if (log.isLoggable(Level.INFO)) log.info(dbUrl + " - " + m_dbTarget.getSystemUser() + "/" + m_systemPassword); try { Connection conn = m_dbTarget.getDriverConnection(dbUrl, m_dbTarget.getSystemUser(), m_systemPassword); @@ -202,7 +202,7 @@ public class CreateAdempiere */ public boolean createUser (Connection sysConn) { - log.info(m_adempiereUser + "/" + m_adempierePassword); + if (log.isLoggable(Level.INFO)) log.info(m_adempiereUser + "/" + m_adempierePassword); return executeCommands(m_dbTarget.getCommands(AdempiereDatabase.CMD_CREATE_USER), sysConn, true, false); } // createUser @@ -214,7 +214,7 @@ public class CreateAdempiere */ public boolean createDatabase (Connection sysConn) { - log.info(m_databaseName + "(" + m_databaseDevice + ")"); + if (log.isLoggable(Level.INFO)) log.info(m_databaseName + "(" + m_databaseDevice + ")"); return executeCommands(m_dbTarget.getCommands(AdempiereDatabase.CMD_CREATE_DATABASE), sysConn, true, false); } // createDatabase @@ -308,7 +308,7 @@ public class CreateAdempiere databaseBuild(); - log.info("#" + count); + if (log.isLoggable(Level.INFO)) log.info("#" + count); try { @@ -792,7 +792,7 @@ public class CreateAdempiere { File file = File.createTempFile("create", ".log"); m_writer = new PrintWriter(new FileWriter(file)); - log.info(file.toString()); + if (log.isLoggable(Level.INFO)) log.info(file.toString()); } m_writer.println(cmd); m_writer.flush(); diff --git a/org.adempiere.base/src/org/compiere/db/JDBCInfo.java b/org.adempiere.base/src/org/compiere/db/JDBCInfo.java index 431f5e5a24..8f94e469d9 100644 --- a/org.adempiere.base/src/org/compiere/db/JDBCInfo.java +++ b/org.adempiere.base/src/org/compiere/db/JDBCInfo.java @@ -44,11 +44,11 @@ public class JDBCInfo public JDBCInfo(Connection conn) throws SQLException { m_md = conn.getMetaData(); - log.info(m_md.getDatabaseProductName()); + if (log.isLoggable(Level.INFO)) log.info(m_md.getDatabaseProductName()); if (log.isLoggable(Level.CONFIG)) log.config(m_md.getDatabaseProductVersion()); // log.config(m_md.getDatabaseMajorVersion() + "/" + m_md.getDatabaseMinorVersion()); // - log.info(m_md.getDriverName()); + if (log.isLoggable(Level.INFO)) log.info(m_md.getDriverName()); if (log.isLoggable(Level.CONFIG)){ log.config(m_md.getDriverVersion()); log.config(m_md.getDriverMajorVersion() + "/" + m_md.getDriverMinorVersion()); @@ -101,7 +101,7 @@ public class JDBCInfo */ public void listCatalogs() throws SQLException { - log.info(m_md.getCatalogTerm() + " -> " + m_md.getCatalogSeparator()); + if (log.isLoggable(Level.INFO)) log.info(m_md.getCatalogTerm() + " -> " + m_md.getCatalogSeparator()); ResultSet rs = m_md.getCatalogs(); while (rs.next()) { @@ -115,7 +115,7 @@ public class JDBCInfo */ public void listSchemas() throws SQLException { - log.info(m_md.getSchemaTerm()); + if (log.isLoggable(Level.INFO)) log.info(m_md.getSchemaTerm()); ResultSet rs = m_md.getSchemas(); while (rs.next()) { diff --git a/org.adempiere.base/src/org/compiere/db/LDAP.java b/org.adempiere.base/src/org/compiere/db/LDAP.java index af76389498..1eb5895a75 100644 --- a/org.adempiere.base/src/org/compiere/db/LDAP.java +++ b/org.adempiere.base/src/org/compiere/db/LDAP.java @@ -74,7 +74,7 @@ public class LDAP } catch (AuthenticationException e) { - log.info("Error: " + principal + " - " + e.getLocalizedMessage()); + if (log.isLoggable(Level.INFO)) log.info("Error: " + principal + " - " + e.getLocalizedMessage()); return false; } catch (Exception e) @@ -82,7 +82,7 @@ public class LDAP log.log (Level.SEVERE, ldapURL + " - " + principal, e); return false; } - log.info("OK: " + principal); + if (log.isLoggable(Level.INFO)) log.info("OK: " + principal); return true; } // validate diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert.java b/org.adempiere.base/src/org/compiere/dbPort/Convert.java index 11069502c2..514fba3292 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert.java @@ -128,10 +128,11 @@ public abstract class Convert } else { - if (m_verbose) - log.info("Executing (" + i + ") <<" + statement + ">>"); - else - log.info("Executing " + i); + if (m_verbose) { + if (log.isLoggable(Level.INFO)) log.info("Executing (" + i + ") <<" + statement + ">>"); + } else { + if (log.isLoggable(Level.INFO)) log.info("Executing " + i); + } try { m_stmt.clearWarnings(); @@ -139,12 +140,13 @@ public abstract class Convert SQLWarning warn = m_stmt.getWarnings(); if (warn != null) { - if (m_verbose) - log.info("- " + warn); - else - { - log.info("Executing (" + i + ") <<" + statement + ">>"); - log.info("- " + warn); + if (m_verbose) { + if (log.isLoggable(Level.INFO)) log.info("- " + warn); + } else { + if (log.isLoggable(Level.INFO)) { + log.info("Executing (" + i + ") <<" + statement + ">>"); + log.info("- " + warn); + } } } if (m_verbose) @@ -159,8 +161,8 @@ public abstract class Convert m_exception = ex; } if (!m_verbose) - log.info("Executing (" + i + ") <<" + statement + ">>"); - log.info("Error executing " + i + "/" + sql.length + " = " + ex); + if (log.isLoggable(Level.INFO)) log.info("Executing (" + i + ") <<" + statement + ">>"); + if (log.isLoggable(Level.INFO)) log.info("Error executing " + i + "/" + sql.length + " = " + ex); } } } // for all statements @@ -169,8 +171,8 @@ public abstract class Convert { m_exception = e; if (!m_verbose) - log.info("Executing (" + i + ") <<" + statement + ">>"); - log.info("Error executing " + i + "/" + sql.length + " = " + e); + if (log.isLoggable(Level.INFO)) log.info("Executing (" + i + ") <<" + statement + ">>"); + if (log.isLoggable(Level.INFO)) log.info("Error executing " + i + "/" + sql.length + " = " + e); return false; } return ok; @@ -212,7 +214,7 @@ public abstract class Convert // line.separator sb.append(sql[i]).append("\n/\n"); if (m_verbose) - log.info("Statement " + i + ": " + sql[i]); + if (log.isLoggable(Level.INFO)) log.info("Statement " + i + ": " + sql[i]); } return sb.toString(); } // convertAll diff --git a/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java b/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java index c7fc608817..8a62847a9f 100644 --- a/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java +++ b/org.adempiere.base/src/org/compiere/dbPort/Convert_SQL92.java @@ -68,7 +68,7 @@ public abstract class Convert_SQL92 extends Convert { // if (trace) { - log.info("OuterJoin<== " + sqlStatement); + if (log.isLoggable(Level.INFO)) log.info("OuterJoin<== " + sqlStatement); // log.info("From=" + fromIndex + ", Where=" + whereIndex + ", End=" + endWhereIndex + ", Length=" + sqlStatement.length()); } // @@ -115,7 +115,7 @@ public abstract class Convert_SQL92 extends Convert { String condition = newWherePart.substring(start+startOffset, end); joins.add(condition); if (trace) - log.info("->" + condition); + if (log.isLoggable(Level.INFO)) log.info("->" + condition); // new WHERE clause newWherePart = newWherePart.substring(0, start) + newWherePart.substring(end); // log.info("=> " + newWherePart); @@ -129,7 +129,7 @@ public abstract class Convert_SQL92 extends Convert { else if (newWherePart.startsWith("OR ")) newWherePart = "WHERE" + newWherePart.substring(2); if (trace) - log.info("=> " + newWherePart); + if (log.isLoggable(Level.INFO)) log.info("=> " + newWherePart); // Correct FROM clause ----------------------------------------------- // Disassemble FROM @@ -150,7 +150,7 @@ public abstract class Convert_SQL92 extends Convert { fromAlias.put(alias, table); fromLookup.put(alias, table); if (trace) - log.info("Alias=" + alias + ", Table=" + table); + if (log.isLoggable(Level.INFO)) log.info("Alias=" + alias + ", Table=" + table); } /** Single column @@ -197,7 +197,7 @@ public abstract class Convert_SQL92 extends Convert { first.setJoinTable((String)fromLookup.get(first.getJoinAlias())); fromAlias.remove(first.getJoinAlias()); // remove from list if (trace) - log.info("-First: " + first); + if (log.isLoggable(Level.INFO)) log.info("-First: " + first); // if (newFrom.length() == 0) newFrom.append(" FROM "); @@ -218,7 +218,7 @@ public abstract class Convert_SQL92 extends Convert { || second.isConditionOf(first) ) { if (trace) - log.info("-Second/key: " + second); + if (log.isLoggable(Level.INFO)) log.info("-Second/key: " + second); newFrom.append(" AND ").append(second.getCondition()); joins.remove(j); // remove from join list fromAlias.remove(first.getJoinAlias()); // remove from table list @@ -231,17 +231,17 @@ public abstract class Convert_SQL92 extends Convert { if (third.isConditionOf(second)) { if (trace) - log.info("-Third/key: " + third); + if (log.isLoggable(Level.INFO)) log.info("-Third/key: " + third); newFrom.append(" AND ").append(third.getCondition()); joins.remove(k); // remove from join list fromAlias.remove(third.getJoinAlias()); // remove from table list } else if (trace) - log.info("-Third/key-skip: " + third); + if (log.isLoggable(Level.INFO)) log.info("-Third/key-skip: " + third); } } else if (trace) - log.info("-Second/key-skip: " + second); + if (log.isLoggable(Level.INFO)) log.info("-Second/key-skip: " + second); } newFrom.append(")"); // close ON // check dependency on first table @@ -253,7 +253,7 @@ public abstract class Convert_SQL92 extends Convert { if (first.getMainTable().equals(second.getMainTable())) { if (trace) - log.info("-Second/dep: " + second); + if (log.isLoggable(Level.INFO)) log.info("-Second/dep: " + second); // FROM (AD_Field f LEFT OUTER JOIN AD_Column c ON (f.AD_Column_ID = c.AD_Column_ID)) // LEFT OUTER JOIN AD_FieldGroup fg ON (f.AD_FieldGroup_ID = fg.AD_FieldGroup_ID), newFrom.insert(6, '('); // _FROM ... @@ -275,7 +275,7 @@ public abstract class Convert_SQL92 extends Convert { if (second.getJoinTable().equals(third.getMainTable())) { if (trace) - log.info("-Third-dep: " + third); + if (log.isLoggable(Level.INFO)) log.info("-Third-dep: " + third); // FROM ((C_BPartner p LEFT OUTER JOIN AD_User c ON (p.C_BPartner_ID=c.C_BPartner_ID)) // LEFT OUTER JOIN C_BPartner_Location l ON (p.C_BPartner_ID=l.C_BPartner_ID)) // LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID) @@ -291,11 +291,11 @@ public abstract class Convert_SQL92 extends Convert { newFrom.append(")"); // close ON } else if (trace) - log.info("-Third-skip: " + third); + if (log.isLoggable(Level.INFO)) log.info("-Third-skip: " + third); } } else if (trace) - log.info("-Second/dep-skip: " + second); + if (log.isLoggable(Level.INFO)) log.info("-Second/dep-skip: " + second); } // dependency on first table } // remaining Tables @@ -309,7 +309,7 @@ public abstract class Convert_SQL92 extends Convert { newFrom.append(" ").append(alias); } if (trace) - log.info(newFrom.toString()); + if (log.isLoggable(Level.INFO)) log.info(newFrom.toString()); // StringBuilder retValue = new StringBuilder (sqlStatement.length()+20); retValue.append(selectPart) @@ -317,7 +317,7 @@ public abstract class Convert_SQL92 extends Convert { .append(newWherePart).append(rest); // if (trace) - log.info("OuterJoin==> " + retValue.toString()); + if (log.isLoggable(Level.INFO)) log.info("OuterJoin==> " + retValue.toString()); return retValue.toString(); } // convertOuterJoin diff --git a/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java b/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java index 0596522537..7525a4fb4b 100644 --- a/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java +++ b/org.adempiere.base/src/org/compiere/impexp/CopyImportFormat.java @@ -61,7 +61,7 @@ public class CopyImportFormat extends SvrProcess */ protected String doIt () throws Exception { - log.info("doIt = From=" + from_AD_ImpFormat_ID + " To=" + to_AD_ImpFormat_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt = From=" + from_AD_ImpFormat_ID + " To=" + to_AD_ImpFormat_ID); MImpFormat from = new MImpFormat (getCtx(), from_AD_ImpFormat_ID, get_TrxName()); if (from.getAD_ImpFormat_ID() != from_AD_ImpFormat_ID) throw new Exception ("From Format not found - " + from_AD_ImpFormat_ID); diff --git a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java index 6ab5159777..f05f8fa9ed 100644 --- a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java +++ b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java @@ -488,7 +488,7 @@ public final class ImpFormat } // we should be at end of line or a delimiter if (pos < length && line.charAt(pos) != delimiter) - log.info("Did not find delimiter at pos " + pos + " " + line); + if (log.isLoggable(Level.INFO)) log.info("Did not find delimiter at pos " + pos + " " + line); pos++; // move over delimiter } else // plain copy diff --git a/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java b/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java index 6c7933214a..68ddc6a59c 100644 --- a/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java +++ b/org.adempiere.base/src/org/compiere/interfaces/impl/ServerBean.java @@ -59,7 +59,7 @@ public class ServerBean implements Server public String postImmediate (Properties ctx, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force) { - log.info ("Table=" + AD_Table_ID + ", Record=" + Record_ID); + if (log.isLoggable(Level.INFO)) log.info ("Table=" + AD_Table_ID + ", Record=" + Record_ID); MAcctSchema[] ass = MAcctSchema.getClientAcctSchema(ctx, AD_Client_ID); return Doc.postImmediate(ass, AD_Table_ID, Record_ID, force, null); @@ -90,7 +90,7 @@ public class ServerBean implements Server */ public ProcessInfo workflow (Properties ctx, ProcessInfo pi, int AD_Workflow_ID) { - log.info ("AD_Workflow_ID=" + AD_Workflow_ID); + if (log.isLoggable(Level.INFO)) log.info ("AD_Workflow_ID=" + AD_Workflow_ID); ProcessUtil.startWorkFlow(ctx, pi, AD_Workflow_ID); return pi; } // workflow diff --git a/org.adempiere.base/src/org/compiere/model/CalloutEngine.java b/org.adempiere.base/src/org/compiere/model/CalloutEngine.java index b901767056..4feb07b283 100644 --- a/org.adempiere.base/src/org/compiere/model/CalloutEngine.java +++ b/org.adempiere.base/src/org/compiere/model/CalloutEngine.java @@ -86,7 +86,7 @@ public class CalloutEngine implements Callout .append(" (old=").append(oldValue) .append(") {active=").append(isCalloutActive()).append("}"); if (!isCalloutActive()) - log.info (msg.toString()); + if (log.isLoggable(Level.INFO)) log.info (msg.toString()); // Find Method Method method = getMethod(methodName); @@ -142,7 +142,7 @@ public class CalloutEngine implements Callout // String retValue = null; StringBuffer msg = new StringBuffer(methodName).append(" - ").append(value); - log.info (msg.toString()); + if (log.isLoggable(Level.INFO)) log.info (msg.toString()); // // Find Method Method method = getMethod(methodName); @@ -259,7 +259,7 @@ public class CalloutEngine implements Callout mTab.setValue("DivideRate", rate2); else mTab.setValue("MultiplyRate", rate2); - log.info(mField.getColumnName() + "=" + rate1 + " => " + rate2); + if (log.isLoggable(Level.INFO)) log.info(mField.getColumnName() + "=" + rate1 + " => " + rate2); return NO_ERROR; } // rate diff --git a/org.adempiere.base/src/org/compiere/model/GridTab.java b/org.adempiere.base/src/org/compiere/model/GridTab.java index 04a049ca6a..0af101e3a5 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTab.java +++ b/org.adempiere.base/src/org/compiere/model/GridTab.java @@ -871,7 +871,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // e.g. Column=UPPER(Name), Key=AD_Element_ID, Query=UPPER(AD_Element.Name) LIKE '%CUSTOMER%' if (tableName == null) { - log.info ("Not successfull - Column=" + if (log.isLoggable(Level.INFO)) log.info ("Not successfull - Column=" + colName + ", Key=" + tabKeyColumn + ", Query=" + query); return query.getWhereClause(); @@ -2345,7 +2345,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // nothing to do if (targetRow == m_currentRow) return m_currentRow; - log.info ("Row=" + targetRow); + if (log.isLoggable(Level.INFO)) log.info ("Row=" + targetRow); // Row range check int newRow = verifyRow(targetRow); @@ -2382,7 +2382,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable */ public int navigateCurrent() { - log.info("Row=" + m_currentRow); + if (log.isLoggable(Level.INFO)) log.info("Row=" + m_currentRow); return setCurrentRow(m_currentRow, true); } // navigateCurrent diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 8baa29436e..d9a752639f 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -578,7 +578,7 @@ public class GridTable extends AbstractTableModel */ public boolean open (int maxRows) { - log.info("MaxRows=" + maxRows); + if (log.isLoggable(Level.INFO)) log.info("MaxRows=" + maxRows); m_maxRows = maxRows; if (m_open) { @@ -880,7 +880,7 @@ public class GridTable extends AbstractTableModel */ public void sort (int col, boolean ascending) { - log.info("#" + col + " " + ascending); + if (log.isLoggable(Level.INFO)) log.info("#" + col + " " + ascending); if (col < 0) { return; } @@ -909,7 +909,7 @@ public class GridTable extends AbstractTableModel else sort.data = rowData[col]; // data } - log.info(field.toString() + " #" + m_sort.size()); + if (log.isLoggable(Level.INFO)) log.info(field.toString() + " #" + m_sort.size()); // sort it MSort sort = new MSort(0, null); @@ -1439,7 +1439,7 @@ public class GridTable extends AbstractTableModel return SAVE_ACCESS; } - log.info("Row=" + m_rowChanged); + if (log.isLoggable(Level.INFO)) log.info("Row=" + m_rowChanged); // inform about data save action, if not manually initiated try @@ -2457,7 +2457,7 @@ public class GridTable extends AbstractTableModel */ public boolean dataNew (int currentRow, boolean copyCurrent) { - log.info("Current=" + currentRow + ", Copy=" + copyCurrent); + if (log.isLoggable(Level.INFO)) log.info("Current=" + currentRow + ", Copy=" + copyCurrent); // Read only if (m_readOnly) { @@ -2551,7 +2551,7 @@ public class GridTable extends AbstractTableModel */ public boolean dataDelete (int row) { - log.info("Row=" + row); + if (log.isLoggable(Level.INFO)) log.info("Row=" + row); if (row < 0) return false; @@ -2699,7 +2699,7 @@ public class GridTable extends AbstractTableModel m_newRow = -1; return; } - log.info("Inserting=" + m_inserting); + if (log.isLoggable(Level.INFO)) log.info("Inserting=" + m_inserting); // Inserting - delete new row if (m_inserting) @@ -2780,7 +2780,7 @@ public class GridTable extends AbstractTableModel */ public void dataRefresh (int row, boolean fireStatusEvent) { - log.info("Row=" + row); + if (log.isLoggable(Level.INFO)) log.info("Row=" + row); if (row < 0 || m_sort.size() == 0 || m_inserting) return; @@ -2899,7 +2899,7 @@ public class GridTable extends AbstractTableModel */ public boolean dataRequery (String whereClause, boolean onlyCurrentRows, int onlyCurrentDays) { - log.info(whereClause + "; OnlyCurrent=" + onlyCurrentRows); + if (log.isLoggable(Level.INFO)) log.info(whereClause + "; OnlyCurrent=" + onlyCurrentRows); close(false); m_onlyCurrentDays = onlyCurrentDays; setSelectWhereClause(whereClause, onlyCurrentRows, m_onlyCurrentDays); @@ -3650,7 +3650,7 @@ public class GridTable extends AbstractTableModel dbProcessedS = rs.getString(idx++); } else - log.info("No Value " + sql); + if (log.isLoggable(Level.INFO)) log.info("No Value " + sql); } catch (SQLException e) { diff --git a/org.adempiere.base/src/org/compiere/model/GridWindow.java b/org.adempiere.base/src/org/compiere/model/GridWindow.java index 790c2edab7..2bab813342 100644 --- a/org.adempiere.base/src/org/compiere/model/GridWindow.java +++ b/org.adempiere.base/src/org/compiere/model/GridWindow.java @@ -130,7 +130,7 @@ public class GridWindow implements Serializable */ public void dispose() { - log.info("AD_Window_ID=" + m_vo.AD_Window_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Window_ID=" + m_vo.AD_Window_ID); for (int i = 0; i < getTabCount(); i++) getTab(i).dispose(); m_tabs.clear(); diff --git a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java index 9af7b4bf1a..7b13c0138c 100644 --- a/org.adempiere.base/src/org/compiere/model/MAcctSchema.java +++ b/org.adempiere.base/src/org/compiere/model/MAcctSchema.java @@ -20,6 +20,7 @@ import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import org.compiere.report.MReportTree; import org.compiere.util.CCache; @@ -473,7 +474,7 @@ public class MAcctSchema extends X_C_AcctSchema */ public void checkCosting() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Create Cost Type if (getM_CostType_ID() == 0) { diff --git a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java index 54659fdeb2..9fc4ad8ac6 100644 --- a/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java +++ b/org.adempiere.base/src/org/compiere/model/MAllocationHdr.java @@ -371,7 +371,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -382,7 +382,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -393,7 +393,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -456,7 +456,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -467,7 +467,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -493,7 +493,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Link getLines(false); @@ -525,7 +525,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); @@ -561,7 +561,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -583,7 +583,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -606,7 +606,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -629,7 +629,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) @@ -840,7 +840,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ private void updateBP(HashSet bps) { - log.info("#" + bps.size()); + if (log.isLoggable(Level.INFO)) log.info("#" + bps.size()); Iterator it = bps.iterator(); while (it.hasNext()) { diff --git a/org.adempiere.base/src/org/compiere/model/MAsset.java b/org.adempiere.base/src/org/compiere/model/MAsset.java index 26551f3c4a..f18b3a8f67 100644 --- a/org.adempiere.base/src/org/compiere/model/MAsset.java +++ b/org.adempiere.base/src/org/compiere/model/MAsset.java @@ -453,7 +453,7 @@ public class MAsset extends X_A_Asset { String sql = "DELETE FROM "+MAssetAddition.Table_Name+" WHERE "+MAssetAddition.COLUMNNAME_Processed+"=? AND "+MAssetAddition.COLUMNNAME_A_Asset_ID+"=?"; int no = DB.executeUpdateEx(sql, new Object[]{false, getA_Asset_ID()}, get_TrxName()); - log.info("@A_Asset_Addition@ @Deleted@ #" + no); + if (log.isLoggable(Level.INFO)) log.info("@A_Asset_Addition@ @Deleted@ #" + no); } // // update invoice line @@ -463,7 +463,7 @@ public class MAsset extends X_A_Asset +","+MInvoiceLine.COLUMNNAME_A_Processed+"=?" +" WHERE "+MInvoiceLine.COLUMNNAME_A_Asset_ID+"=?"; int no = DB.executeUpdateEx(sql, new Object[]{null, false, getA_Asset_ID()}, get_TrxName()); - log.info("@C_InvoiceLine@ @Updated@ #" + no); + if (log.isLoggable(Level.INFO)) log.info("@C_InvoiceLine@ @Updated@ #" + no); } return true; } // beforeDelete diff --git a/org.adempiere.base/src/org/compiere/model/MAssetAddition.java b/org.adempiere.base/src/org/compiere/model/MAssetAddition.java index 6b9adb82c0..78abe1ed78 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetAddition.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetAddition.java @@ -510,7 +510,7 @@ public class MAssetAddition extends X_A_Asset_Addition public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); // setProcessing(false); return true; } // unlockIt @@ -518,14 +518,14 @@ public class MAssetAddition extends X_A_Asset_Addition public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); return false; } // invalidateIt public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Call model validators m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); @@ -610,7 +610,7 @@ public class MAssetAddition extends X_A_Asset_Addition public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -618,7 +618,7 @@ public class MAssetAddition extends X_A_Asset_Addition public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -642,7 +642,7 @@ public class MAssetAddition extends X_A_Asset_Addition // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // // Check/Create ASI: @@ -881,7 +881,7 @@ public class MAssetAddition extends X_A_Asset_Addition public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); setDocAction(DOCACTION_None); return true; } // closeIt diff --git a/org.adempiere.base/src/org/compiere/model/MAssetDisposed.java b/org.adempiere.base/src/org/compiere/model/MAssetDisposed.java index 850f5fa3d2..a391976fe3 100644 --- a/org.adempiere.base/src/org/compiere/model/MAssetDisposed.java +++ b/org.adempiere.base/src/org/compiere/model/MAssetDisposed.java @@ -153,7 +153,7 @@ implements DocAction public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -161,7 +161,7 @@ implements DocAction public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -187,7 +187,7 @@ implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // //loading asset diff --git a/org.adempiere.base/src/org/compiere/model/MBankStatement.java b/org.adempiere.base/src/org/compiere/model/MBankStatement.java index 24a41a7c31..3a9d647894 100644 --- a/org.adempiere.base/src/org/compiere/model/MBankStatement.java +++ b/org.adempiere.base/src/org/compiere/model/MBankStatement.java @@ -275,7 +275,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -286,7 +286,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -297,7 +297,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -345,7 +345,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -356,7 +356,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -382,7 +382,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info("completeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("completeIt - " + toString()); // Set Payment reconciled MBankStatementLine[] lines = getLines(false); @@ -422,7 +422,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -510,7 +510,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -531,7 +531,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean reverseCorrectIt() { - log.info("reverseCorrectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseCorrectIt - " + toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -551,7 +551,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean reverseAccrualIt() { - log.info("reverseAccrualIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseAccrualIt - " + toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -571,7 +571,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction */ public boolean reActivateIt() { - log.info("reActivateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java b/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java index 9e3b42881d..c6ce85bf55 100644 --- a/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java +++ b/org.adempiere.base/src/org/compiere/model/MBankStatementLoader.java @@ -117,7 +117,7 @@ import org.compiere.impexp.BankStatementLoaderInterface; localFileName = fileName; try { - log.info( "MBankStatementLoader Class Name=" + getStmtLoaderClass()); + if (log.isLoggable(Level.INFO)) log.info( "MBankStatementLoader Class Name=" + getStmtLoaderClass()); Class bsrClass = Class.forName(getStmtLoaderClass()); m_loader = (BankStatementLoaderInterface) bsrClass.newInstance(); } diff --git a/org.adempiere.base/src/org/compiere/model/MCash.java b/org.adempiere.base/src/org/compiere/model/MCash.java index d8fadf6608..5c9bee25ef 100644 --- a/org.adempiere.base/src/org/compiere/model/MCash.java +++ b/org.adempiere.base/src/org/compiere/model/MCash.java @@ -334,7 +334,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -345,7 +345,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -356,7 +356,7 @@ public class MCash extends X_C_Cash implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -415,7 +415,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -426,7 +426,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -454,7 +454,7 @@ public class MCash extends X_C_Cash implements DocAction if (!isApproved()) approveIt(); // - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); MCashLine[] lines = getLines(false); for (int i = 0; i < lines.length; i++) @@ -566,7 +566,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -677,7 +677,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -698,7 +698,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -723,7 +723,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -743,7 +743,7 @@ public class MCash extends X_C_Cash implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MClient.java b/org.adempiere.base/src/org/compiere/model/MClient.java index 51bfe68ee2..55d3a49682 100644 --- a/org.adempiere.base/src/org/compiere/model/MClient.java +++ b/org.adempiere.base/src/org/compiere/model/MClient.java @@ -498,7 +498,7 @@ public class MClient extends X_AD_Client } if (EMail.SENT_OK.equals (msg)) { - log.info("Sent Test EMail to " + getRequestEMail()); + if (log.isLoggable(Level.INFO)) log.info("Sent Test EMail to " + getRequestEMail()); return "OK"; } else @@ -626,7 +626,7 @@ public class MClient extends X_AD_Client } if (EMail.SENT_OK.equals (msg)) { - log.info("Sent EMail " + subject + " to " + to); + if (log.isLoggable(Level.INFO)) log.info("Sent EMail " + subject + " to " + to); return true; } else @@ -728,13 +728,14 @@ public class MClient extends X_AD_Client // if (email.isSentOK()) { - if (from != null) - log.info("Sent Email: " + email.getSubject() + if (from != null) { + if (log.isLoggable(Level.INFO)) log.info("Sent Email: " + email.getSubject() + " from " + from.getEMail() + " to " + to.getEMail()); - else - log.info("Sent Email: " + email.getSubject() - + " to " + to.getEMail()); + } else { + if (log.isLoggable(Level.INFO)) log.info("Sent Email: " + email.getSubject() + + " to " + to.getEMail()); + } return true; } else diff --git a/org.adempiere.base/src/org/compiere/model/MClientShare.java b/org.adempiere.base/src/org/compiere/model/MClientShare.java index fe20921514..3aa9cf2a2a 100644 --- a/org.adempiere.base/src/org/compiere/model/MClientShare.java +++ b/org.adempiere.base/src/org/compiere/model/MClientShare.java @@ -213,7 +213,7 @@ public class MClientShare extends X_AD_ClientShare .append(" SET AD_Org_ID=0 WHERE AD_Org_ID<>0 AND AD_Client_ID=?"); int no = DB.executeUpdate(sql.toString(), getAD_Client_ID(), get_TrxName()); info = new StringBuilder().append(getTableName()).append(" set to Shared #").append(no); - log.info(info.toString()); + if (log.isLoggable(Level.INFO)) log.info(info.toString()); } else if (isOrgLevelOnly()) { @@ -222,7 +222,7 @@ public class MClientShare extends X_AD_ClientShare .append(" WHERE AD_Org_ID=0 AND AD_Client_ID=?"); int no = DB.getSQLValue(get_TrxName(), sql.toString(), getAD_Client_ID()); info = new StringBuilder().append(getTableName()).append(" Shared records #").append(no); - log.info(info.toString()); + if (log.isLoggable(Level.INFO)) log.info(info.toString()); } return info.toString(); } // setDataToLevel @@ -268,7 +268,7 @@ public class MClientShare extends X_AD_ClientShare rs = null; pstmt = null; } - log.info(info.toString()); + if (log.isLoggable(Level.INFO)) log.info(info.toString()); return info.toString(); } // listChildRecords diff --git a/org.adempiere.base/src/org/compiere/model/MCostDetail.java b/org.adempiere.base/src/org/compiere/model/MCostDetail.java index b612917995..719af4c2a5 100644 --- a/org.adempiere.base/src/org/compiere/model/MCostDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCostDetail.java @@ -798,7 +798,7 @@ public class MCostDetail extends X_M_CostDetail setProcessed(true); ok = save(); } - log.info(ok + " - " + toString()); + if (log.isLoggable(Level.INFO)) log.info(ok + " - " + toString()); return ok; } // process diff --git a/org.adempiere.base/src/org/compiere/model/MDepositBatch.java b/org.adempiere.base/src/org/compiere/model/MDepositBatch.java index fd637c0382..671489483f 100644 --- a/org.adempiere.base/src/org/compiere/model/MDepositBatch.java +++ b/org.adempiere.base/src/org/compiere/model/MDepositBatch.java @@ -151,7 +151,7 @@ public class MDepositBatch extends X_X_DepositBatch */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -162,7 +162,7 @@ public class MDepositBatch extends X_X_DepositBatch */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); return true; } // invalidateIt @@ -174,7 +174,7 @@ public class MDepositBatch extends X_X_DepositBatch */ public boolean voidIt() { - log.info("voidIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("voidIt - " + toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MDepreciationEntry.java b/org.adempiere.base/src/org/compiere/model/MDepreciationEntry.java index 72d8d0ae23..0ad5af1767 100644 --- a/org.adempiere.base/src/org/compiere/model/MDepreciationEntry.java +++ b/org.adempiere.base/src/org/compiere/model/MDepreciationEntry.java @@ -178,7 +178,7 @@ implements DocAction public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); // setProcessing(false); return true; } // unlockIt @@ -192,7 +192,7 @@ implements DocAction public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) { @@ -216,7 +216,7 @@ implements DocAction public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } @@ -224,7 +224,7 @@ implements DocAction public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt diff --git a/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java b/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java index 519562c7a9..7199e268a2 100644 --- a/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java +++ b/org.adempiere.base/src/org/compiere/model/MDepreciationWorkfile.java @@ -135,7 +135,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile protected boolean beforeSave (boolean newRecord) { - log.info ("Entering: trxName=" + get_TrxName()); + if (log.isLoggable(Level.INFO)) log.info ("Entering: trxName=" + get_TrxName()); // copy UseLife to A_Life if (newRecord) { //@win: should only update only if newrecord @@ -186,7 +186,7 @@ public class MDepreciationWorkfile extends X_A_Depreciation_Workfile } - log.info("Leaving: trxName=" + get_TrxName() + " [RETURN TRUE]"); + if (log.isLoggable(Level.INFO)) log.info("Leaving: trxName=" + get_TrxName() + " [RETURN TRUE]"); return true; } // beforeSave diff --git a/org.adempiere.base/src/org/compiere/model/MDiscountSchema.java b/org.adempiere.base/src/org/compiere/model/MDiscountSchema.java index 0cf681fc34..fc92c73ca8 100644 --- a/org.adempiere.base/src/org/compiere/model/MDiscountSchema.java +++ b/org.adempiere.base/src/org/compiere/model/MDiscountSchema.java @@ -236,7 +236,7 @@ public class MDiscountSchema extends X_M_DiscountSchema else if (DISCOUNTTYPE_Formula.equals(getDiscountType()) || DISCOUNTTYPE_Pricelist.equals(getDiscountType())) { - log.info ("Not supported (yet) DiscountType=" + getDiscountType()); + if (log.isLoggable(Level.INFO)) log.info ("Not supported (yet) DiscountType=" + getDiscountType()); return Env.ZERO; } diff --git a/org.adempiere.base/src/org/compiere/model/MDistribution.java b/org.adempiere.base/src/org/compiere/model/MDistribution.java index 5ceb4eb07b..f269586ce5 100644 --- a/org.adempiere.base/src/org/compiere/model/MDistribution.java +++ b/org.adempiere.base/src/org/compiere/model/MDistribution.java @@ -311,7 +311,7 @@ public class MDistribution extends X_GL_Distribution */ public void distribute (MAccount acct, BigDecimal Amt, BigDecimal Qty, int C_Currency_ID) { - log.info("distribute - Amt=" + Amt + " - Qty=" + Qty + " - " + acct); + if (log.isLoggable(Level.INFO)) log.info("distribute - Amt=" + Amt + " - Qty=" + Qty + " - " + acct); getLines(false); int precision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID); // First Round diff --git a/org.adempiere.base/src/org/compiere/model/MDistributionList.java b/org.adempiere.base/src/org/compiere/model/MDistributionList.java index 9c0f2cdac7..f78eb2b2cb 100644 --- a/org.adempiere.base/src/org/compiere/model/MDistributionList.java +++ b/org.adempiere.base/src/org/compiere/model/MDistributionList.java @@ -101,7 +101,7 @@ public class MDistributionList extends X_M_DistributionList // Update Ratio if (ratioTotal.compareTo(getRatioTotal()) != 0) { - log.info("getLines - Set RatioTotal from " + getRatioTotal() + " to " + ratioTotal); + if (log.isLoggable(Level.INFO)) log.info("getLines - Set RatioTotal from " + getRatioTotal() + " to " + ratioTotal); setRatioTotal(ratioTotal); saveEx(); } diff --git a/org.adempiere.base/src/org/compiere/model/MDunningRunEntry.java b/org.adempiere.base/src/org/compiere/model/MDunningRunEntry.java index 114be9a27e..40b603b749 100644 --- a/org.adempiere.base/src/org/compiere/model/MDunningRunEntry.java +++ b/org.adempiere.base/src/org/compiere/model/MDunningRunEntry.java @@ -152,7 +152,7 @@ public class MDunningRunEntry extends X_C_DunningRunEntry else msg.append(" @No@ @IsRemitTo@"); msg.append(" & @IsBillTo@"); - log.info(msg.toString()); + if (log.isLoggable(Level.INFO)) log.info(msg.toString()); setC_BPartner_Location_ID (firstActive.getC_BPartner_Location_ID()); } } diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 1ae6d88a4e..f22bf66490 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1084,7 +1084,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -1095,7 +1095,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -1106,7 +1106,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -1214,7 +1214,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -1225,7 +1225,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -1268,7 +1268,7 @@ public class MInOut extends X_M_InOut implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); StringBuilder info = new StringBuilder(); // For all lines @@ -1308,7 +1308,7 @@ public class MInOut extends X_M_InOut implements DocAction rmaLine = new MRMALine(getCtx(), sLine.getM_RMALine_ID(), get_TrxName()); } - log.info("Line=" + sLine.getLine() + " - Qty=" + sLine.getMovementQty()); + if (log.isLoggable(Level.INFO)) log.info("Line=" + sLine.getLine() + " - Qty=" + sLine.getMovementQty()); // Stock Movement - Counterpart MOrder.reserveStock if (product != null @@ -1938,7 +1938,7 @@ public class MInOut extends X_M_InOut implements DocAction MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null); MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID, get_TrxName()); - log.info("Counter BP=" + counterBP.getName()); + if (log.isLoggable(Level.INFO)) log.info("Counter BP=" + counterBP.getName()); // Document Type int C_DocTypeTarget_ID = 0; @@ -2020,7 +2020,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -2082,7 +2082,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -2104,7 +2104,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -2285,7 +2285,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -2313,7 +2313,7 @@ public class MInOut extends X_M_InOut implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java b/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java index d0716299f9..e4ed865051 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java +++ b/org.adempiere.base/src/org/compiere/model/MInOutConfirm.java @@ -286,7 +286,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -297,7 +297,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -308,7 +308,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -358,7 +358,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -369,7 +369,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -395,7 +395,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // MInOut inout = new MInOut (getCtx(), getM_InOut_ID(), get_TrxName()); MInOutLineConfirm[] lines = getLines(false); @@ -599,7 +599,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction if (confirm.getDifferenceQty().signum() != 0 && !inout.isSOTrx() && inout.getRef_InOut_ID() != 0) { - log.info("Difference=" + confirm.getDifferenceQty()); + if (log.isLoggable(Level.INFO)) log.info("Difference=" + confirm.getDifferenceQty()); if (m_creditMemo == null) { m_creditMemo = new MInvoice (inout, null); @@ -624,7 +624,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction // Create Inventory Difference if (confirm.getScrappedQty().signum() != 0) { - log.info("Scrapped=" + confirm.getScrappedQty()); + if (log.isLoggable(Level.INFO)) log.info("Scrapped=" + confirm.getScrappedQty()); if (m_inventory == null) { MWarehouse wh = MWarehouse.get(getCtx(), inout.getM_Warehouse_ID()); @@ -661,7 +661,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -721,7 +721,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -743,7 +743,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -763,7 +763,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -783,7 +783,7 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MInventory.java b/org.adempiere.base/src/org/compiere/model/MInventory.java index f4453238ac..4cc7f53633 100644 --- a/org.adempiere.base/src/org/compiere/model/MInventory.java +++ b/org.adempiere.base/src/org/compiere/model/MInventory.java @@ -303,7 +303,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -314,7 +314,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -325,7 +325,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -358,7 +358,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -369,7 +369,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -395,7 +395,7 @@ public class MInventory extends X_M_Inventory implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); MInventoryLine[] lines = getLines(false); for (MInventoryLine line : lines) @@ -664,7 +664,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -723,7 +723,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -743,7 +743,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -851,7 +851,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -877,7 +877,7 @@ public class MInventory extends X_M_Inventory implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index 4080e7e606..5afa5c3865 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -1349,7 +1349,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -1360,7 +1360,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -1371,7 +1371,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -1673,7 +1673,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -1684,7 +1684,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -1710,7 +1710,7 @@ public class MInvoice extends X_C_Invoice implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); StringBuilder info = new StringBuilder(); // POS supports multiple payments @@ -2099,7 +2099,7 @@ public class MInvoice extends X_C_Invoice implements DocAction MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null); // MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID); - log.info("Counter BP=" + counterBP.getName()); + if (log.isLoggable(Level.INFO)) log.info("Counter BP=" + counterBP.getName()); // Document Type int C_DocTypeTarget_ID = 0; @@ -2168,7 +2168,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -2240,7 +2240,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -2262,7 +2262,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -2479,7 +2479,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -2505,7 +2505,7 @@ public class MInvoice extends X_C_Invoice implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index 33171970f1..f55d4f5c05 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -1003,7 +1003,7 @@ public class MInvoiceLine extends X_C_InvoiceLine StringBuilder sql = new StringBuilder("DELETE C_LandedCostAllocation WHERE C_InvoiceLine_ID=").append(getC_InvoiceLine_ID()); int no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) - log.info("Deleted #" + no); + if (log.isLoggable(Level.INFO)) log.info("Deleted #" + no); int inserted = 0; // *** Single Criteria *** @@ -1063,7 +1063,7 @@ public class MInvoiceLine extends X_C_InvoiceLine } inserted++; } - log.info("Inserted " + inserted); + if (log.isLoggable(Level.INFO)) log.info("Inserted " + inserted); allocateLandedCostRounding(); return ""; } @@ -1185,7 +1185,7 @@ public class MInvoiceLine extends X_C_InvoiceLine inserted++; } - log.info("Inserted " + inserted); + if (log.isLoggable(Level.INFO)) log.info("Inserted " + inserted); allocateLandedCostRounding(); return ""; } // allocate Costs diff --git a/org.adempiere.base/src/org/compiere/model/MJournal.java b/org.adempiere.base/src/org/compiere/model/MJournal.java index 5724d07ff1..147dcb63fc 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournal.java +++ b/org.adempiere.base/src/org/compiere/model/MJournal.java @@ -410,7 +410,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -421,7 +421,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); return true; } // invalidateIt @@ -431,7 +431,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -564,7 +564,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -575,7 +575,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -601,7 +601,7 @@ public class MJournal extends X_GL_Journal implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // User Validation String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); if (valid != null) @@ -644,7 +644,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -676,7 +676,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -733,7 +733,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public MJournal reverseCorrectIt (int GL_JournalBatch_ID) { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Journal MJournal reverse = new MJournal (this); reverse.setGL_JournalBatch_ID(GL_JournalBatch_ID); @@ -793,7 +793,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public MJournal reverseAccrualIt (int GL_JournalBatch_ID) { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Journal MJournal reverse = new MJournal (this); reverse.setGL_JournalBatch_ID(GL_JournalBatch_ID); @@ -824,7 +824,7 @@ public class MJournal extends X_GL_Journal implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java index bf03822a72..6d2e657b9b 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java +++ b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java @@ -285,7 +285,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -296,7 +296,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); return true; } // invalidateIt @@ -306,7 +306,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -408,7 +408,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -419,7 +419,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -430,7 +430,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public String completeIt() { - log.info("completeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("completeIt - " + toString()); // Re-Check if (!m_justPrepared) { @@ -524,7 +524,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean voidIt() { - log.info("voidIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("voidIt - " + toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -543,7 +543,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -599,7 +599,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean reverseCorrectIt() { - log.info("reverseCorrectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseCorrectIt - " + toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -671,7 +671,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean reverseAccrualIt() { - log.info("reverseAccrualIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseAccrualIt - " + toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -734,7 +734,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction */ public boolean reActivateIt() { - log.info("reActivateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); diff --git a/org.adempiere.base/src/org/compiere/model/MLocation.java b/org.adempiere.base/src/org/compiere/model/MLocation.java index 57d2f7f38a..576d58acbd 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MLocation.java @@ -291,7 +291,7 @@ public class MLocation extends X_C_Location implements Comparator setRegionName(m_r.getName()); if (m_r.getC_Country_ID() != getC_Country_ID()) { - log.info("Region(" + region + ") C_Country_ID=" + region.getC_Country_ID() + if (log.isLoggable(Level.INFO)) log.info("Region(" + region + ") C_Country_ID=" + region.getC_Country_ID() + " - From C_Country_ID=" + getC_Country_ID()); setC_Country_ID(region.getC_Country_ID()); } diff --git a/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java b/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java index be63e95c10..c53d661c2d 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java +++ b/org.adempiere.base/src/org/compiere/model/MLocatorLookup.java @@ -453,7 +453,7 @@ public final class MLocatorLookup extends Lookup implements Serializable catch (InterruptedException ie) { } - log.info("#" + m_lookup.size()); + if (log.isLoggable(Level.INFO)) log.info("#" + m_lookup.size()); return m_lookup.size(); } // refresh diff --git a/org.adempiere.base/src/org/compiere/model/MMediaServer.java b/org.adempiere.base/src/org/compiere/model/MMediaServer.java index 5676f57aac..e838253714 100644 --- a/org.adempiere.base/src/org/compiere/model/MMediaServer.java +++ b/org.adempiere.base/src/org/compiere/model/MMediaServer.java @@ -100,10 +100,9 @@ public class MMediaServer extends X_CM_Media_Server try { ftp.connect (getIP_Address()); - if (ftp.login (getUserName(), getPassword())) - log.info("Connected to " + getIP_Address() + " as " + getUserName()); - else - { + if (ftp.login (getUserName(), getPassword())) { + if (log.isLoggable(Level.INFO)) log.info("Connected to " + getIP_Address() + " as " + getUserName()); + } else { log.warning("Could NOT connect to " + getIP_Address() + " as " + getUserName()); return false; } diff --git a/org.adempiere.base/src/org/compiere/model/MMovement.java b/org.adempiere.base/src/org/compiere/model/MMovement.java index e02f9423a7..8db1ed5be4 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovement.java +++ b/org.adempiere.base/src/org/compiere/model/MMovement.java @@ -249,7 +249,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -260,7 +260,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -271,7 +271,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -323,7 +323,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -334,7 +334,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -373,7 +373,7 @@ public class MMovement extends X_M_Movement implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // MMovementLine[] lines = getLines(false); @@ -609,7 +609,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -664,7 +664,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -686,7 +686,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -806,7 +806,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -832,7 +832,7 @@ public class MMovement extends X_M_Movement implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java b/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java index cf28d208fa..58dc0c4713 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java +++ b/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java @@ -268,7 +268,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -279,7 +279,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -290,7 +290,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -333,7 +333,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -344,7 +344,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -370,7 +370,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info("completeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("completeIt - " + toString()); // MMovement move = new MMovement (getCtx(), getM_Movement_ID(), get_TrxName()); MMovementLineConfirm[] lines = getLines(false); @@ -466,7 +466,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction m_inventoryInfo += "," + m_inventoryFrom.getDocumentNo(); } - log.info("createDifferenceDoc - Difference=" + confirm.getDifferenceQty()); + if (log.isLoggable(Level.INFO)) log.info("createDifferenceDoc - Difference=" + confirm.getDifferenceQty()); MInventoryLine line = new MInventoryLine (m_inventoryFrom, mLine.getM_Locator_ID(), mLine.getM_Product_ID(), mLine.getM_AttributeSetInstance_ID(), confirm.getDifferenceQty(), Env.ZERO); @@ -508,7 +508,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction m_inventoryInfo += "," + m_inventoryTo.getDocumentNo(); } - log.info("createDifferenceDoc - Scrapped=" + confirm.getScrappedQty()); + if (log.isLoggable(Level.INFO)) log.info("createDifferenceDoc - Scrapped=" + confirm.getScrappedQty()); MInventoryLine line = new MInventoryLine (m_inventoryTo, mLine.getM_LocatorTo_ID(), mLine.getM_Product_ID(), mLine.getM_AttributeSetInstance_ID(), confirm.getScrappedQty(), Env.ZERO); @@ -530,7 +530,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean voidIt() { - log.info("voidIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("voidIt - " + toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -550,7 +550,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -572,7 +572,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean reverseCorrectIt() { - log.info("reverseCorrectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseCorrectIt - " + toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -592,7 +592,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean reverseAccrualIt() { - log.info("reverseAccrualIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseAccrualIt - " + toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -612,7 +612,7 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction */ public boolean reActivateIt() { - log.info("reActivateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 064edb850a..f9916d90cc 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -1197,7 +1197,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -1208,7 +1208,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -1220,7 +1220,7 @@ public class MOrder extends X_C_Order implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -1860,7 +1860,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -1871,7 +1871,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -1935,7 +1935,7 @@ public class MOrder extends X_C_Order implements DocAction if (!isApproved()) approveIt(); getLines(true,null); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); StringBuilder info = new StringBuilder(); boolean realTimePOS = MSysConfig.getBooleanValue(MSysConfig.REAL_TIME_POS, false , getAD_Client_ID()); @@ -2149,7 +2149,7 @@ public class MOrder extends X_C_Order implements DocAction */ private MInOut createShipment(MDocType dt, Timestamp movementDate) { - log.info("For " + dt); + if (log.isLoggable(Level.INFO)) log.info("For " + dt); MInOut shipment = new MInOut (this, dt.getC_DocTypeShipment_ID(), movementDate); // shipment.setDateAcct(getDateAcct()); if (!shipment.save(get_TrxName())) @@ -2210,7 +2210,7 @@ public class MOrder extends X_C_Order implements DocAction */ private MInvoice createInvoice (MDocType dt, MInOut shipment, Timestamp invoiceDate) { - log.info(dt.toString()); + if (log.isLoggable(Level.INFO)) log.info(dt.toString()); MInvoice invoice = new MInvoice (this, dt.getC_DocTypeInvoice_ID(), invoiceDate); if (!invoice.save(get_TrxName())) { @@ -2328,7 +2328,7 @@ public class MOrder extends X_C_Order implements DocAction MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, null); MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID, get_TrxName()); - log.info("Counter BP=" + counterBP.getName()); + if (log.isLoggable(Level.INFO)) log.info("Counter BP=" + counterBP.getName()); // Document Type int C_DocTypeTarget_ID = 0; @@ -2395,7 +2395,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -2547,7 +2547,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -2590,7 +2590,7 @@ public class MOrder extends X_C_Order implements DocAction * (reverse steps of close()) */ public String reopenIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); if (!MOrder.DOCSTATUS_Closed.equals(getDocStatus())) { return "Not closed - can't reopen"; @@ -2642,7 +2642,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -2662,7 +2662,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -2682,7 +2682,7 @@ public class MOrder extends X_C_Order implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) @@ -2714,10 +2714,10 @@ public class MOrder extends X_C_Order implements DocAction } // PO - just re-open - if (!isSOTrx()) - log.info("Existing documents not modified - " + dt); + if (!isSOTrx()) { + if (log.isLoggable(Level.INFO)) log.info("Existing documents not modified - " + dt); // Reverse Direct Documents - else if (MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO) // (W)illCall(I)nvoice + } else if (MDocType.DOCSUBTYPESO_OnCreditOrder.equals(DocSubTypeSO) // (W)illCall(I)nvoice || MDocType.DOCSUBTYPESO_WarehouseOrder.equals(DocSubTypeSO) // (W)illCall(P)ickup || MDocType.DOCSUBTYPESO_POSOrder.equals(DocSubTypeSO)) // (W)alkIn(R)eceipt { @@ -2726,7 +2726,7 @@ public class MOrder extends X_C_Order implements DocAction } else { - log.info("Existing documents not modified - SubType=" + DocSubTypeSO); + if (log.isLoggable(Level.INFO)) log.info("Existing documents not modified - SubType=" + DocSubTypeSO); } /* globalqss - 2317928 - Reactivating/Voiding order must reset posted */ diff --git a/org.adempiere.base/src/org/compiere/model/MPInstance.java b/org.adempiere.base/src/org/compiere/model/MPInstance.java index ab2af144df..38c9ea8c76 100644 --- a/org.adempiere.base/src/org/compiere/model/MPInstance.java +++ b/org.adempiere.base/src/org/compiere/model/MPInstance.java @@ -222,7 +222,7 @@ public class MPInstance extends X_AD_PInstance { if (Record_ID < 0) { - log.info("Set to 0 from " + Record_ID); + if (log.isLoggable(Level.INFO)) log.info("Set to 0 from " + Record_ID); Record_ID = 0; } set_ValueNoCheck ("Record_ID", new Integer(Record_ID)); @@ -250,10 +250,12 @@ public class MPInstance extends X_AD_PInstance */ public void log() { - log.info(toString()); - MPInstanceLog[] pil = getLog(); - for (int i = 0; i < pil.length; i++) - log.info(i + "=" + pil[i]); + if (log.isLoggable(Level.INFO)) { + log.info(toString()); + MPInstanceLog[] pil = getLog(); + for (int i = 0; i < pil.length; i++) + log.info(i + "=" + pil[i]); + } } // log /** Result OK = 1 */ diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index 95a5a89d90..f0c0b5bfd4 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -455,7 +455,7 @@ public final class MPayment extends X_C_Payment */ public boolean processOnline() { - log.info ("Amt=" + getPayAmt()); + if (log.isLoggable(Level.INFO)) log.info ("Amt=" + getPayAmt()); // setIsOnline(true); setErrorMessage(null); @@ -464,7 +464,7 @@ public final class MPayment extends X_C_Payment { if (isVoided()) { - log.info("Already voided - " + getR_Result() + " - " + getR_RespMsg()); + if (log.isLoggable(Level.INFO)) log.info("Already voided - " + getR_Result() + " - " + getR_RespMsg()); setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentAlreadyVoided")); return true; } @@ -473,7 +473,7 @@ public final class MPayment extends X_C_Payment { if (isDelayedCapture()) { - log.info("Already delayed capture - " + getR_Result() + " - " + getR_RespMsg()); + if (log.isLoggable(Level.INFO)) log.info("Already delayed capture - " + getR_Result() + " - " + getR_RespMsg()); setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentAlreadyDelayedCapture")); return true; } @@ -482,7 +482,7 @@ public final class MPayment extends X_C_Payment { if (isApproved()) { - log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg()); + if (log.isLoggable(Level.INFO)) log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg()); setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentAlreadyProcessed")); return true; } @@ -604,7 +604,7 @@ public final class MPayment extends X_C_Payment */ public boolean startProcess (Properties ctx, ProcessInfo pi, Trx trx) { - log.info("startProcess - " + pi.getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info("startProcess - " + pi.getRecord_ID()); boolean retValue = false; // if (pi.getRecord_ID() != get_ID()) @@ -1708,7 +1708,7 @@ public final class MPayment extends X_C_Payment */ public boolean unlockIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setProcessing(false); return true; } // unlockIt @@ -1719,7 +1719,7 @@ public final class MPayment extends X_C_Payment */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -1731,7 +1731,7 @@ public final class MPayment extends X_C_Payment */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -1847,7 +1847,7 @@ public final class MPayment extends X_C_Payment */ public boolean approveIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(true); return true; } // approveIt @@ -1858,7 +1858,7 @@ public final class MPayment extends X_C_Payment */ public boolean rejectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setIsApproved(false); return true; } // rejectIt @@ -1885,7 +1885,7 @@ public final class MPayment extends X_C_Payment // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Charge Handling if (getC_Charge_ID() != 0) @@ -2058,7 +2058,7 @@ public final class MPayment extends X_C_Payment MBPartner counterBP = new MBPartner (getCtx(), counterC_BPartner_ID, get_TrxName()); // MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID); - log.info("Counter BP=" + counterBP.getName()); + if (log.isLoggable(Level.INFO)) log.info("Counter BP=" + counterBP.getName()); // Document Type int C_DocTypeTarget_ID = 0; @@ -2396,7 +2396,7 @@ public final class MPayment extends X_C_Payment */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -2453,7 +2453,7 @@ public final class MPayment extends X_C_Payment */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -2474,7 +2474,7 @@ public final class MPayment extends X_C_Payment */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -2633,7 +2633,7 @@ public final class MPayment extends X_C_Payment */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); @@ -2660,7 +2660,7 @@ public final class MPayment extends X_C_Payment */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java b/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java index 27ba32811c..6dd107eddb 100644 --- a/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java +++ b/org.adempiere.base/src/org/compiere/model/MPaymentTransaction.java @@ -173,7 +173,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce public boolean processOnline(String trxName) { - log.info ("Amt=" + getPayAmt()); + if (log.isLoggable(Level.INFO)) log.info ("Amt=" + getPayAmt()); // setIsOnline(true); setErrorMessage(null); @@ -182,7 +182,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce { if (isVoided()) { - log.info("Already voided - " + getR_Result() + " - " + getR_RespMsg()); + if (log.isLoggable(Level.INFO)) log.info("Already voided - " + getR_Result() + " - " + getR_RespMsg()); setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyVoided")); return true; } @@ -191,7 +191,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce { if (isDelayedCapture()) { - log.info("Already delayed capture - " + getR_Result() + " - " + getR_RespMsg()); + if (log.isLoggable(Level.INFO)) log.info("Already delayed capture - " + getR_Result() + " - " + getR_RespMsg()); setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyDelayedCapture")); return true; } @@ -200,7 +200,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce { if (isApproved()) { - log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg()); + if (log.isLoggable(Level.INFO)) log.info("Already processed - " + getR_Result() + " - " + getR_RespMsg()); setErrorMessage(Msg.getMsg(Env.getCtx(), "PaymentTransactionAlreadyProcessed")); return true; } @@ -506,7 +506,7 @@ public class MPaymentTransaction extends X_C_PaymentTransaction implements Proce */ @Override public boolean startProcess(Properties ctx, ProcessInfo pi, Trx trx) { - log.info("startProcess - " + pi.getRecord_ID()); + if (log.isLoggable(Level.INFO)) log.info("startProcess - " + pi.getRecord_ID()); boolean retValue = false; // if (pi.getRecord_ID() != get_ID()) diff --git a/org.adempiere.base/src/org/compiere/model/MProcess.java b/org.adempiere.base/src/org/compiere/model/MProcess.java index 9307f37fdd..49416feea1 100644 --- a/org.adempiere.base/src/org/compiere/model/MProcess.java +++ b/org.adempiere.base/src/org/compiere/model/MProcess.java @@ -300,7 +300,7 @@ public class MProcess extends X_AD_Process { int AD_PInstance_ID = processInfo.getAD_PInstance_ID(); // execute on this thread/connection - log.info(ProcedureName + "(" + AD_PInstance_ID + ")"); + if (log.isLoggable(Level.INFO)) log.info(ProcedureName + "(" + AD_PInstance_ID + ")"); return ProcessUtil.startDatabaseProcedure(processInfo, ProcedureName, trx, managedTrx); } // startProcess @@ -322,7 +322,7 @@ public class MProcess extends X_AD_Process */ private boolean startClass (ProcessInfo pi, Trx trx, boolean managedTrx) { - log.info(pi.getClassName()); + if (log.isLoggable(Level.INFO)) log.info(pi.getClassName()); return ProcessUtil.startJavaProcess(getCtx(), pi, trx, managedTrx); } // startClass diff --git a/org.adempiere.base/src/org/compiere/model/MProject.java b/org.adempiere.base/src/org/compiere/model/MProject.java index 6cdf7eb790..3854dcab3f 100644 --- a/org.adempiere.base/src/org/compiere/model/MProject.java +++ b/org.adempiere.base/src/org/compiere/model/MProject.java @@ -333,10 +333,9 @@ public class MProject extends X_C_Project } } // Phase exist - if (exists) - log.info("Phase already exists here, ignored - " + fromPhases[i]); - else - { + if (exists) { + if (log.isLoggable(Level.INFO)) log.info("Phase already exists here, ignored - " + fromPhases[i]); + } else { MProjectPhase toPhase = new MProjectPhase (getCtx (), 0, get_TrxName()); PO.copyValues (fromPhases[i], toPhase, getAD_Client_ID (), getAD_Org_ID ()); toPhase.setC_Project_ID (getC_Project_ID ()); diff --git a/org.adempiere.base/src/org/compiere/model/MProjectPhase.java b/org.adempiere.base/src/org/compiere/model/MProjectPhase.java index 240b97aa8b..9a966115bc 100644 --- a/org.adempiere.base/src/org/compiere/model/MProjectPhase.java +++ b/org.adempiere.base/src/org/compiere/model/MProjectPhase.java @@ -203,10 +203,9 @@ public class MProjectPhase extends X_C_ProjectPhase } } // Phase exist - if (exists) - log.info("Task already exists here, ignored - " + fromTasks[i]); - else - { + if (exists) { + if (log.isLoggable(Level.INFO)) log.info("Task already exists here, ignored - " + fromTasks[i]); + } else { MProjectTask toTask = new MProjectTask (getCtx (), 0, get_TrxName()); PO.copyValues (fromTasks[i], toTask, getAD_Client_ID (), getAD_Org_ID ()); toTask.setC_ProjectPhase_ID (getC_ProjectPhase_ID ()); diff --git a/org.adempiere.base/src/org/compiere/model/MRMA.java b/org.adempiere.base/src/org/compiere/model/MRMA.java index bc311100b4..3cd3cb2e70 100644 --- a/org.adempiere.base/src/org/compiere/model/MRMA.java +++ b/org.adempiere.base/src/org/compiere/model/MRMA.java @@ -307,7 +307,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -318,7 +318,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); return true; } // invalidateIt @@ -328,7 +328,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -451,7 +451,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -462,7 +462,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -488,7 +488,7 @@ public class MRMA extends X_M_RMA implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info("completeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("completeIt - " + toString()); // /* Flow for the creation of the credit memo document changed @@ -726,7 +726,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean voidIt() { - log.info("voidIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("voidIt - " + toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -784,7 +784,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -803,7 +803,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean reverseCorrectIt() { - log.info("reverseCorrectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseCorrectIt - " + toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -823,7 +823,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean reverseAccrualIt() { - log.info("reverseAccrualIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseAccrualIt - " + toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -843,7 +843,7 @@ public class MRMA extends X_M_RMA implements DocAction */ public boolean reActivateIt() { - log.info("reActivateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MRequest.java b/org.adempiere.base/src/org/compiere/model/MRequest.java index ed608bfaac..433a7867be 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequest.java +++ b/org.adempiere.base/src/org/compiere/model/MRequest.java @@ -1232,7 +1232,7 @@ public class MRequest extends X_R_Request DB.close(rs, pstmt); rs = null; pstmt = null; } - log.info("EMail Success=" + success + ", Failure=" + failure + if (log.isLoggable(Level.INFO)) log.info("EMail Success=" + success + ", Failure=" + failure + " - Notices=" + notices); } // sendNotice diff --git a/org.adempiere.base/src/org/compiere/model/MRequisition.java b/org.adempiere.base/src/org/compiere/model/MRequisition.java index ff8f984593..54b89140b8 100644 --- a/org.adempiere.base/src/org/compiere/model/MRequisition.java +++ b/org.adempiere.base/src/org/compiere/model/MRequisition.java @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.Timestamp; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; import org.compiere.process.DocAction; @@ -222,7 +223,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -233,7 +234,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); return true; } // invalidateIt @@ -243,7 +244,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -300,7 +301,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -311,7 +312,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -337,7 +338,7 @@ public class MRequisition extends X_M_Requisition implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // User Validation String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); @@ -378,7 +379,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean voidIt() { - log.info("voidIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("voidIt - " + toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -402,7 +403,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -455,7 +456,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean reverseCorrectIt() { - log.info("reverseCorrectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseCorrectIt - " + toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -475,7 +476,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean reverseAccrualIt() { - log.info("reverseAccrualIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseAccrualIt - " + toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -495,7 +496,7 @@ public class MRequisition extends X_M_Requisition implements DocAction */ public boolean reActivateIt() { - log.info("reActivateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MRole.java b/org.adempiere.base/src/org/compiere/model/MRole.java index 88ec4bb31a..3fd40e78f9 100644 --- a/org.adempiere.base/src/org/compiere/model/MRole.java +++ b/org.adempiere.base/src/org/compiere/model/MRole.java @@ -2277,7 +2277,7 @@ public final class MRole extends X_AD_Role "Required=" + TableLevel + "(" + getTableLevelString(Env.getAD_Language(ctx), TableLevel) + ") != UserLevel=" + userLevel); - log.info (toString()); + if (log.isLoggable(Level.INFO)) log.info (toString()); return retValue; } // canView diff --git a/org.adempiere.base/src/org/compiere/model/MSchedule.java b/org.adempiere.base/src/org/compiere/model/MSchedule.java index 4c84c6f65f..7562ff3ec3 100644 --- a/org.adempiere.base/src/org/compiere/model/MSchedule.java +++ b/org.adempiere.base/src/org/compiere/model/MSchedule.java @@ -129,10 +129,10 @@ public class MSchedule extends X_AD_Schedule retVal = inetAddress.getHostName(); } if (ipOnly.equals(retVal)) { - log.info("Allowed here - IP=" + retVal+ " match"); + if (log.isLoggable(Level.INFO)) log.info("Allowed here - IP=" + retVal+ " match"); return true; } else { - log.info("Not Allowed here - IP=" + retVal+ " does not match " + ipOnly); + if (log.isLoggable(Level.INFO)) log.info("Not Allowed here - IP=" + retVal+ " does not match " + ipOnly); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MSession.java b/org.adempiere.base/src/org/compiere/model/MSession.java index 7c1375a3ef..6800c1f5f3 100644 --- a/org.adempiere.base/src/org/compiere/model/MSession.java +++ b/org.adempiere.base/src/org/compiere/model/MSession.java @@ -239,7 +239,7 @@ public class MSession extends X_AD_Session setProcessed(true); saveEx(); s_sessions.remove(new Integer(getAD_Session_ID())); - log.info(TimeUtil.formatElapsed(getCreated(), getUpdated())); + if (log.isLoggable(Level.INFO)) log.info(TimeUtil.formatElapsed(getCreated(), getUpdated())); } // logout /** diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index 0985010a50..125714e248 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -378,7 +378,7 @@ public final class MSetup boolean hasMCampaign, boolean hasSRegion, File AccountingFile) { - log.info(m_client.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_client.toString()); // m_hasProject = hasProject; m_hasMCampaign = hasMCampaign; @@ -789,11 +789,11 @@ public final class MSetup } else if (DisplayType.Account == c.getAD_Reference_ID()) { acct.set_Value(columnName, getAcct(columnName)); - log.info("Account: " + columnName); + if (log.isLoggable(Level.INFO)) log.info("Account: " + columnName); } else if (DisplayType.YesNo == c.getAD_Reference_ID()) { acct.set_Value(columnName, Boolean.TRUE); - log.info("YesNo: " + c.getColumnName()); + if (log.isLoggable(Level.INFO)) log.info("YesNo: " + c.getColumnName()); } } acct.setAD_Client_ID(m_client.getAD_Client_ID()); @@ -939,7 +939,7 @@ public final class MSetup m_trx.close(); return false; } - log.info("C_Country_ID=" + C_Country_ID + if (log.isLoggable(Level.INFO)) log.info("C_Country_ID=" + C_Country_ID + ", City=" + City + ", C_Region_ID=" + C_Region_ID); m_info.append("\n----\n"); // diff --git a/org.adempiere.base/src/org/compiere/model/MStore.java b/org.adempiere.base/src/org/compiere/model/MStore.java index a7898f3314..0b01c99b69 100644 --- a/org.adempiere.base/src/org/compiere/model/MStore.java +++ b/org.adempiere.base/src/org/compiere/model/MStore.java @@ -383,7 +383,7 @@ public class MStore extends X_W_Store String msg = email.send(); if (EMail.SENT_OK.equals (msg)) { - log.info("Sent EMail " + subject + " to " + to); + if (log.isLoggable(Level.INFO)) log.info("Sent EMail " + subject + " to " + to); return true; } else @@ -420,7 +420,7 @@ public class MStore extends X_W_Store String msg = email.send(); if (EMail.SENT_OK.equals (msg)) { - log.info("Sent Test EMail to " + getWStoreEMail()); + if (log.isLoggable(Level.INFO)) log.info("Sent Test EMail to " + getWStoreEMail()); return "OK"; } else @@ -606,7 +606,7 @@ public class MStore extends X_W_Store log.severe("Not created MailMsgType=" + initMsgs[i][0]); } // for all initMsgs - log.info("#" + counter); + if (log.isLoggable(Level.INFO)) log.info("#" + counter); m_msgs = null; // reset return counter; } // createMessages diff --git a/org.adempiere.base/src/org/compiere/model/MTest.java b/org.adempiere.base/src/org/compiere/model/MTest.java index 8a94f208a8..c57b0f3cf8 100644 --- a/org.adempiere.base/src/org/compiere/model/MTest.java +++ b/org.adempiere.base/src/org/compiere/model/MTest.java @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; +import java.util.logging.Level; import org.compiere.Adempiere; import org.compiere.util.Env; @@ -106,7 +107,7 @@ public class MTest extends X_Test */ protected boolean afterDelete (boolean success) { - log.info("*** Success=" + success); + if (log.isLoggable(Level.INFO)) log.info("*** Success=" + success); return success; } @@ -117,7 +118,7 @@ public class MTest extends X_Test */ protected boolean beforeSave (boolean newRecord) { - log.info("New=" + newRecord + " ***"); + if (log.isLoggable(Level.INFO)) log.info("New=" + newRecord + " ***"); return true; } @@ -129,7 +130,7 @@ public class MTest extends X_Test */ protected boolean afterSave (boolean newRecord, boolean success) { - log.info("New=" + newRecord + ", Success=" + success + " ***"); + if (log.isLoggable(Level.INFO)) log.info("New=" + newRecord + ", Success=" + success + " ***"); return success; } // afterSave diff --git a/org.adempiere.base/src/org/compiere/model/MTimeExpense.java b/org.adempiere.base/src/org/compiere/model/MTimeExpense.java index 1f65f0efb7..7eb872a930 100644 --- a/org.adempiere.base/src/org/compiere/model/MTimeExpense.java +++ b/org.adempiere.base/src/org/compiere/model/MTimeExpense.java @@ -275,7 +275,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -286,7 +286,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -297,7 +297,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -351,7 +351,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -362,7 +362,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -388,7 +388,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction // Implicit Approval if (!isApproved()) approveIt(); - log.info("completeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("completeIt - " + toString()); // User Validation String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); @@ -411,7 +411,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean voidIt() { - log.info("voidIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("voidIt - " + toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); @@ -436,7 +436,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -457,7 +457,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean reverseCorrectIt() { - log.info("reverseCorrectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseCorrectIt - " + toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -477,7 +477,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean reverseAccrualIt() { - log.info("reverseAccrualIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseAccrualIt - " + toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -497,7 +497,7 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction */ public boolean reActivateIt() { - log.info("reActivateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/compiere/model/MTree.java b/org.adempiere.base/src/org/compiere/model/MTree.java index bd59d3bfeb..b96f0bdb1e 100644 --- a/org.adempiere.base/src/org/compiere/model/MTree.java +++ b/org.adempiere.base/src/org/compiere/model/MTree.java @@ -87,7 +87,7 @@ public class MTree extends MTree_Base else AD_User_ID = Env.getContextAsInt(ctx, "AD_User_ID"); m_clientTree = clientTree; - log.info("AD_Tree_ID=" + AD_Tree_ID + if (log.isLoggable(Level.INFO)) log.info("AD_Tree_ID=" + AD_Tree_ID + ", AD_User_ID=" + AD_User_ID + ", Editable=" + editable + ", OnClient=" + clientTree); diff --git a/org.adempiere.base/src/org/compiere/model/MWarehouse.java b/org.adempiere.base/src/org/compiere/model/MWarehouse.java index dd51fa1b02..5ab89ff0f2 100644 --- a/org.adempiere.base/src/org/compiere/model/MWarehouse.java +++ b/org.adempiere.base/src/org/compiere/model/MWarehouse.java @@ -19,6 +19,7 @@ package org.compiere.model; import java.sql.ResultSet; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import org.compiere.util.CCache; import org.compiere.util.DB; @@ -196,7 +197,7 @@ public class MWarehouse extends X_M_Warehouse MLocator loc = new MLocator (this, "Standard"); loc.setIsDefault(true); loc.saveEx(); - log.info("Created default locator for " + getName()); + if (log.isLoggable(Level.INFO)) log.info("Created default locator for " + getName()); return loc; } // getLocators diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 417d22a43a..e0920ae018 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -1715,7 +1715,7 @@ public abstract class PO continue; if (get_Value(i) == null || get_Value(i).equals(Null.NULL)) { - log.info(p_info.getColumnName(i)); + if (log.isLoggable(Level.INFO)) log.info(p_info.getColumnName(i)); return false; } } diff --git a/org.adempiere.base/src/org/compiere/model/Tax.java b/org.adempiere.base/src/org/compiere/model/Tax.java index 1a9f67e1c5..5b5cf3e5c4 100644 --- a/org.adempiere.base/src/org/compiere/model/Tax.java +++ b/org.adempiere.base/src/org/compiere/model/Tax.java @@ -483,7 +483,7 @@ public class Tax if (CLogMgt.isLevelFine()) { - log.info("get(Detail) - Category=" + C_TaxCategory_ID + if (log.isLoggable(Level.INFO)) log.info("get(Detail) - Category=" + C_TaxCategory_ID + ", SOTrx=" + IsSOTrx); if (log.isLoggable(Level.CONFIG)) log.config("get(Detail) - BillFrom=" + billFromC_Location_ID + ", BillTo=" + billToC_Location_ID + ", BillDate=" + billDate); diff --git a/org.adempiere.base/src/org/compiere/print/DataEngine.java b/org.adempiere.base/src/org/compiere/print/DataEngine.java index aaae8e1771..6c665db523 100644 --- a/org.adempiere.base/src/org/compiere/print/DataEngine.java +++ b/org.adempiere.base/src/org/compiere/print/DataEngine.java @@ -215,7 +215,7 @@ public class DataEngine String reportName, String tableName) { m_startTime = System.currentTimeMillis(); - log.info(reportName + " - " + m_language.getAD_Language()); + if (log.isLoggable(Level.INFO)) log.info(reportName + " - " + m_language.getAD_Language()); if (log.isLoggable(Level.FINE)) { log.fine("TableName=" + tableName + ", Query=" + query); @@ -1114,7 +1114,7 @@ public class DataEngine log.warning("NO Rows - ms=" + (System.currentTimeMillis()-m_startTime)); } else - log.info("Rows=" + pd.getRowCount() + if (log.isLoggable(Level.INFO)) log.info("Rows=" + pd.getRowCount() + " - ms=" + (System.currentTimeMillis()-m_startTime)); } // loadPrintData diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index b23a0413aa..9c9697aec0 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -389,12 +389,12 @@ public class MPrintFormat extends X_AD_PrintFormat { if (language == null || language.isBaseLanguage()) { - log.info("Ignored - " + language); + if (log.isLoggable(Level.INFO)) log.info("Ignored - " + language); m_translationViewLanguage = null; } else { - log.info("Language=" + language.getAD_Language()); + if (log.isLoggable(Level.INFO)) log.info("Language=" + language.getAD_Language()); m_translationViewLanguage = language.getAD_Language(); m_language = language; } diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormatProcess.java b/org.adempiere.base/src/org/compiere/print/MPrintFormatProcess.java index 1002bc82d3..e7c64c6fe1 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormatProcess.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormatProcess.java @@ -72,14 +72,14 @@ public class MPrintFormatProcess extends SvrProcess { if (m_AD_Table_ID != null && m_AD_Table_ID.intValue() > 0) { - log.info("Create from AD_Table_ID=" + m_AD_Table_ID); + if (log.isLoggable(Level.INFO)) log.info("Create from AD_Table_ID=" + m_AD_Table_ID); MPrintFormat pf = MPrintFormat.createFromTable(getCtx(), m_AD_Table_ID.intValue(), getRecord_ID()); addLog(m_AD_Table_ID.intValue(), null, new BigDecimal(pf.getItemCount()), pf.getName()); return pf.getName() + " #" + pf.getItemCount(); } else if (m_AD_PrintFormat_ID != null && m_AD_PrintFormat_ID.intValue() > 0) { - log.info("Copy from AD_PrintFormat_ID=" + m_AD_PrintFormat_ID); + if (log.isLoggable(Level.INFO)) log.info("Copy from AD_PrintFormat_ID=" + m_AD_PrintFormat_ID); MPrintFormat pf = MPrintFormat.copy (getCtx(), m_AD_PrintFormat_ID.intValue(), getRecord_ID()); addLog(m_AD_PrintFormat_ID.intValue(), null, new BigDecimal(pf.getItemCount()), pf.getName()); return pf.getName() + " #" + pf.getItemCount(); diff --git a/org.adempiere.base/src/org/compiere/print/PrintData.java b/org.adempiere.base/src/org/compiere/print/PrintData.java index fe575bfef7..5a7bcd87d3 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintData.java +++ b/org.adempiere.base/src/org/compiere/print/PrintData.java @@ -571,7 +571,7 @@ public class PrintData implements Serializable */ private static void dumpHeader (PrintData pd) { - log.info(pd.toString()); + if (log.isLoggable(Level.INFO)) log.info(pd.toString()); if (pd.getColumnInfo() != null) { for (int i = 0; i < pd.getColumnInfo().length; i++) @@ -586,7 +586,7 @@ public class PrintData implements Serializable */ private static void dumpRow (PrintData pd, int row) { - log.info("Row #" + row); + if (log.isLoggable(Level.INFO)) log.info("Row #" + row); if (row < 0 || row >= pd.getRowCount()) { log.warning("- invalid -"); diff --git a/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java b/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java index 1f13fe90d0..d33d4140de 100644 --- a/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java +++ b/org.adempiere.base/src/org/compiere/print/PrintFormatUtil.java @@ -86,7 +86,7 @@ public class PrintFormatUtil DB.close(rs, pstmt); rs = null; pstmt = null; } - log.info ("Total = " + total); + if (log.isLoggable(Level.INFO)) log.info ("Total = " + total); } // addMissingColumns diff --git a/org.adempiere.base/src/org/compiere/print/ReportEngine.java b/org.adempiere.base/src/org/compiere/print/ReportEngine.java index 58d595a5a7..f132fe5b48 100644 --- a/org.adempiere.base/src/org/compiere/print/ReportEngine.java +++ b/org.adempiere.base/src/org/compiere/print/ReportEngine.java @@ -134,7 +134,7 @@ public class ReportEngine implements PrintServiceAttributeListener { if (pf == null) throw new IllegalArgumentException("ReportEngine - no PrintFormat"); - log.info(pf + " -- " + query); + if (log.isLoggable(Level.INFO)) log.info(pf + " -- " + query); m_ctx = ctx; // m_printFormat = pf; @@ -359,7 +359,7 @@ public class ReportEngine implements PrintServiceAttributeListener */ public void print () { - log.info(m_info.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_info.toString()); if (m_layout == null) layout(); @@ -400,7 +400,7 @@ public class ReportEngine implements PrintServiceAttributeListener // Document: Print Copies if (printCopy) { - log.info("Copy " + (m_info.getCopies()-1)); + if (log.isLoggable(Level.INFO)) log.info("Copy " + (m_info.getCopies()-1)); prats.add(new Copies(m_info.getCopies()-1)); job = getPrinterJob(m_info.getPrinterName()); // job.getPrintService().addPrintServiceAttributeListener(this); @@ -995,7 +995,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount) } File file2 = new File(fileName); - log.info(file2.getAbsolutePath() + " - " + file2.length()); + if (log.isLoggable(Level.INFO)) log.info(file2.getAbsolutePath() + " - " + file2.length()); return file2.exists(); } // createPDF @@ -1224,7 +1224,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount) } if (format != null && format.getItemCount() == 0) { - log.info("No Items - recreating: " + format); + if (log.isLoggable(Level.INFO)) log.info("No Items - recreating: " + format); format.delete(true); format = null; } diff --git a/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java b/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java index 97cefdbd77..2551c48d26 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java +++ b/org.adempiere.base/src/org/compiere/print/layout/LayoutEngine.java @@ -120,7 +120,7 @@ public class LayoutEngine implements Pageable, Printable, Doc public LayoutEngine (MPrintFormat format, PrintData data, MQuery query, PrintInfo info , String trxName) { m_TrxName = trxName; - log.info(format + " - " + data + " - " + query); + if (log.isLoggable(Level.INFO)) log.info(format + " - " + data + " - " + query); // s_FASTDRAW = MClient.get(format.getCtx()).isUseBetaFunctions(); // setPrintFormat(format, false); @@ -997,7 +997,7 @@ public class LayoutEngine implements Pageable, Printable, Doc // for every row for (int row = 0; row < m_data.getRowCount(); row++) { - log.info("Row=" + row); + if (log.isLoggable(Level.INFO)) log.info("Row=" + row); m_data.setRowIndex(row); boolean somethingPrinted = true; // prevent NL of nothing printed and supress null // for every item @@ -1202,7 +1202,7 @@ public class LayoutEngine implements Pageable, Printable, Doc if (m_format.isTranslationView()) format.setTranslationLanguage(m_format.getLanguage()); int AD_Column_ID = item.getAD_Column_ID(); - log.info(format + " - Item=" + item.getName() + " (" + AD_Column_ID + ")"); + if (log.isLoggable(Level.INFO)) log.info(format + " - Item=" + item.getName() + " (" + AD_Column_ID + ")"); // Object obj = data.getNode(new Integer(AD_Column_ID)); // Object obj = data.getNode(item.getColumnName()); // slower @@ -1536,7 +1536,7 @@ public class LayoutEngine implements Pageable, Printable, Doc private PrintElement layoutTable (MPrintFormat format, PrintData printData, int xOffset) { - log.info(format.getName() + " - " + printData.getName()); + if (log.isLoggable(Level.INFO)) log.info(format.getName() + " - " + printData.getName()); MPrintTableFormat tf = format.getTableFormat(); // Initial Values HashMap rowColFont = new HashMap(); diff --git a/org.adempiere.base/src/org/compiere/process/AdempiereService.java b/org.adempiere.base/src/org/compiere/process/AdempiereService.java index 16717e6a38..2f9d2a277b 100644 --- a/org.adempiere.base/src/org/compiere/process/AdempiereService.java +++ b/org.adempiere.base/src/org/compiere/process/AdempiereService.java @@ -98,7 +98,7 @@ public class AdempiereService extends StateEngine } if (!ok) return abort(); - log.info("start - " + ok); + if (log.isLoggable(Level.INFO)) log.info("start - " + ok); getState(); return ok; } // start @@ -127,7 +127,7 @@ public class AdempiereService extends StateEngine } if (!ok) return abort(); - log.info("resume - " + ok); + if (log.isLoggable(Level.INFO)) log.info("resume - " + ok); getState(); return ok; } // resume @@ -156,7 +156,7 @@ public class AdempiereService extends StateEngine return abort(); } } - log.info("complete - " + ok); + if (log.isLoggable(Level.INFO)) log.info("complete - " + ok); return ok; } // complete @@ -183,7 +183,7 @@ public class AdempiereService extends StateEngine return abort(); } } - log.info("suspend - " + ok); + if (log.isLoggable(Level.INFO)) log.info("suspend - " + ok); return ok; } // suspend diff --git a/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java b/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java index 14bd225819..126602e950 100644 --- a/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java +++ b/org.adempiere.base/src/org/compiere/process/DocActionTemplate.java @@ -19,6 +19,7 @@ package org.compiere.process; import java.io.File; import java.math.BigDecimal; import java.util.Properties; +import java.util.logging.Level; import org.compiere.model.MDocType; import org.compiere.model.ModelValidationEngine; @@ -126,7 +127,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); // setProcessing(false); return true; } // unlockIt @@ -137,7 +138,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean invalidateIt() { - log.info("invalidateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("invalidateIt - " + toString()); // setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -148,7 +149,7 @@ public class DocActionTemplate extends PO implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -184,7 +185,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); // setIsApproved(true); return true; } // approveIt @@ -195,7 +196,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); // setIsApproved(false); return true; } // rejectIt @@ -221,7 +222,7 @@ public class DocActionTemplate extends PO implements DocAction // Implicit Approval // if (!isApproved()) approveIt(); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // // User Validation @@ -268,7 +269,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean voidIt() { - log.info("voidIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("voidIt - " + toString()); return closeIt(); } // voidIt @@ -279,7 +280,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean closeIt() { - log.info("closeIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("closeIt - " + toString()); // Close Not delivered Qty // setDocAction(DOCACTION_None); @@ -292,7 +293,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean reverseCorrectIt() { - log.info("reverseCorrectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseCorrectIt - " + toString()); return false; } // reverseCorrectionIt @@ -302,7 +303,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean reverseAccrualIt() { - log.info("reverseAccrualIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reverseAccrualIt - " + toString()); return false; } // reverseAccrualIt @@ -312,7 +313,7 @@ public class DocActionTemplate extends PO implements DocAction */ public boolean reActivateIt() { - log.info("reActivateIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString()); // setProcessed(false); if (reverseCorrectIt()) return true; diff --git a/org.adempiere.base/src/org/compiere/process/DocumentEngine.java b/org.adempiere.base/src/org/compiere/process/DocumentEngine.java index 5efdd8230a..c85de31b8c 100644 --- a/org.adempiere.base/src/org/compiere/process/DocumentEngine.java +++ b/org.adempiere.base/src/org/compiere/process/DocumentEngine.java @@ -1248,7 +1248,7 @@ public class DocumentEngine implements DocAction return null; String error = null; - log.info ("Table=" + AD_Table_ID + ", Record=" + Record_ID); + if (log.isLoggable(Level.INFO)) log.info ("Table=" + AD_Table_ID + ", Record=" + Record_ID); MAcctSchema[] ass = MAcctSchema.getClientAcctSchema(ctx, AD_Client_ID); error = Doc.postImmediate(ass, AD_Table_ID, Record_ID, force, trxName); return error; diff --git a/org.adempiere.base/src/org/compiere/process/FactReconcile.java b/org.adempiere.base/src/org/compiere/process/FactReconcile.java index 4ecbe345d3..fc29dc039e 100644 --- a/org.adempiere.base/src/org/compiere/process/FactReconcile.java +++ b/org.adempiere.base/src/org/compiere/process/FactReconcile.java @@ -69,7 +69,7 @@ public class FactReconcile extends SvrProcess protected String doIt() throws Exception { - log.info("Reconcile Account: " + account.getName()); + if (log.isLoggable(Level.INFO)) log.info("Reconcile Account: " + account.getName()); String subselect = "null"; @@ -115,7 +115,7 @@ public class FactReconcile extends SvrProcess String sql = ""; - log.info("AD_PInstance_ID= " + getAD_PInstance_ID()); + if (log.isLoggable(Level.INFO)) log.info("AD_PInstance_ID= " + getAD_PInstance_ID()); PreparedStatement pstmt = null; ResultSet rs = null; diff --git a/org.adempiere.base/src/org/compiere/process/PosKeyGenerate.java b/org.adempiere.base/src/org/compiere/process/PosKeyGenerate.java index 4bc16cd4e7..1d6c79c7dc 100644 --- a/org.adempiere.base/src/org/compiere/process/PosKeyGenerate.java +++ b/org.adempiere.base/src/org/compiere/process/PosKeyGenerate.java @@ -17,6 +17,7 @@ package org.compiere.process; import java.util.List; +import java.util.logging.Level; import org.adempiere.exceptions.FillMandatoryException; import org.compiere.model.MPOSKey; @@ -43,7 +44,7 @@ public class PosKeyGenerate extends SvrProcess { if ( para.getParameterName().equals("M_Product_Category_ID") ) productCategoryId = para.getParameterAsInt(); else - log.info("Parameter not found " + para.getParameterName()); + if (log.isLoggable(Level.INFO)) log.info("Parameter not found " + para.getParameterName()); } if ( posKeyLayoutId == 0 ) diff --git a/org.adempiere.base/src/org/compiere/process/ProjectClose.java b/org.adempiere.base/src/org/compiere/process/ProjectClose.java index bd264a89c7..c40ab5c259 100644 --- a/org.adempiere.base/src/org/compiere/process/ProjectClose.java +++ b/org.adempiere.base/src/org/compiere/process/ProjectClose.java @@ -62,7 +62,7 @@ public class ProjectClose extends SvrProcess protected String doIt() throws Exception { MProject project = new MProject (getCtx(), m_C_Project_ID, get_TrxName()); - log.info("doIt - " + project); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + project); MProjectLine[] projectLines = project.getLines(); if (MProject.PROJECTCATEGORY_WorkOrderJob.equals(project.getProjectCategory()) diff --git a/org.adempiere.base/src/org/compiere/process/SvrProcess.java b/org.adempiere.base/src/org/compiere/process/SvrProcess.java index 5e147d559f..2e3901ae57 100644 --- a/org.adempiere.base/src/org/compiere/process/SvrProcess.java +++ b/org.adempiere.base/src/org/compiere/process/SvrProcess.java @@ -440,7 +440,7 @@ public abstract class SvrProcess implements ProcessCall if (m_pi != null) m_pi.addLog(id, date, number, msg,tableId,recordId); - log.info(id + " - " + date + " - " + number + " - " + msg +" - "+tableId); + if (log.isLoggable(Level.INFO)) log.info(id + " - " + date + " - " + number + " - " + msg +" - "+tableId); } // addLog /************************************************************************** @@ -454,7 +454,7 @@ public abstract class SvrProcess implements ProcessCall { if (m_pi != null) m_pi.addLog(id, date, number, msg); - log.info(id + " - " + date + " - " + number + " - " + msg); + if (log.isLoggable(Level.INFO)) log.info(id + " - " + date + " - " + number + " - " + msg); } // addLog /** diff --git a/org.adempiere.base/src/org/compiere/report/FinReport.java b/org.adempiere.base/src/org/compiere/report/FinReport.java index d20b049932..a8b1d34157 100644 --- a/org.adempiere.base/src/org/compiere/report/FinReport.java +++ b/org.adempiere.base/src/org/compiere/report/FinReport.java @@ -199,7 +199,7 @@ public class FinReport extends SvrProcess if ( p_PA_ReportCube_ID > 0) m_parameterWhere.append(" AND PA_ReportCube_ID=").append(p_PA_ReportCube_ID); - log.info(sb.toString()); + if (log.isLoggable(Level.INFO)) log.info(sb.toString()); // m_report.list(); } // prepare @@ -208,7 +208,7 @@ public class FinReport extends SvrProcess */ private void setPeriods() { - log.info("C_Calendar_ID=" + m_report.getC_Calendar_ID()); + if (log.isLoggable(Level.INFO)) log.info("C_Calendar_ID=" + m_report.getC_Calendar_ID()); Timestamp today = TimeUtil.getDay(System.currentTimeMillis()); ArrayList list = new ArrayList(); @@ -268,7 +268,7 @@ public class FinReport extends SvrProcess */ protected String doIt() throws Exception { - log.info("AD_PInstance_ID=" + getAD_PInstance_ID()); + if (log.isLoggable(Level.INFO)) log.info("AD_PInstance_ID=" + getAD_PInstance_ID()); if ( p_PA_ReportCube_ID > 0 ) { @@ -327,7 +327,7 @@ public class FinReport extends SvrProcess */ private void insertLine (int line) { - log.info("" + m_lines[line]); + if (log.isLoggable(Level.INFO)) log.info("" + m_lines[line]); // No source lines - Headings if (m_lines[line] == null || m_lines[line].getSources().length == 0) @@ -888,7 +888,7 @@ public class FinReport extends SvrProcess */ private void insertLineSource (int line) { - log.info("Line=" + line + " - " + m_lines[line]); + if (log.isLoggable(Level.INFO)) log.info("Line=" + line + " - " + m_lines[line]); // No source lines if (m_lines[line] == null || m_lines[line].getSources().length == 0) @@ -1044,7 +1044,7 @@ public class FinReport extends SvrProcess */ private void insertLineTrx (int line, String variable) { - log.info("Line=" + line + " - Variable=" + variable); + if (log.isLoggable(Level.INFO)) log.info("Line=" + line + " - Variable=" + variable); // Insert StringBuffer insert = new StringBuffer("INSERT INTO T_Report " @@ -1169,7 +1169,7 @@ public class FinReport extends SvrProcess private MPrintFormat getPrintFormat() { int AD_PrintFormat_ID = m_report.getAD_PrintFormat_ID(); - log.info("AD_PrintFormat_ID=" + AD_PrintFormat_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_PrintFormat_ID=" + AD_PrintFormat_ID); MPrintFormat pf = null; boolean createNew = AD_PrintFormat_ID == 0; diff --git a/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java b/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java index 3ffa02826f..c5d69fb822 100644 --- a/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java +++ b/org.adempiere.base/src/org/compiere/sla/SLAGoalProcess.java @@ -62,7 +62,7 @@ public class SLAGoalProcess extends SvrProcess */ protected String doIt () throws Exception { - log.info ("PA_SLA_Goal_ID=" + p_PA_SLA_Goal_ID); + if (log.isLoggable(Level.INFO)) log.info ("PA_SLA_Goal_ID=" + p_PA_SLA_Goal_ID); MSLAGoal goal = new MSLAGoal(getCtx(), p_PA_SLA_Goal_ID, get_TrxName()); if (goal.get_ID() == 0) throw new AdempiereUserError("@PA_SLA_Goal_ID@ " + p_PA_SLA_Goal_ID); diff --git a/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java b/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java index b9022a4a9f..67dd109f1e 100644 --- a/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java +++ b/org.adempiere.base/src/org/compiere/sla/SLAMeasureProcess.java @@ -63,7 +63,7 @@ public class SLAMeasureProcess extends SvrProcess */ protected String doIt () throws Exception { - log.info ("PA_SLA_Measure_ID=" + p_PA_SLA_Measure_ID); + if (log.isLoggable(Level.INFO)) log.info ("PA_SLA_Measure_ID=" + p_PA_SLA_Measure_ID); MSLAMeasure measure = new MSLAMeasure (getCtx(), p_PA_SLA_Measure_ID, get_TrxName()); if (measure.get_ID() == 0) throw new AdempiereUserError("@PA_SLA_Measure_ID@ " + p_PA_SLA_Measure_ID); diff --git a/org.adempiere.base/src/org/compiere/util/CLogMgt.java b/org.adempiere.base/src/org/compiere/util/CLogMgt.java index 0ab1d44207..fb5524a29a 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogMgt.java +++ b/org.adempiere.base/src/org/compiere/util/CLogMgt.java @@ -493,11 +493,12 @@ public class CLogMgt { if (p == null) return; - if (logIt) - log.info(description + " - Size=" + p.size() + if (logIt) { + if (log.isLoggable(Level.INFO)) log.info(description + " - Size=" + p.size() + ", Hash=" + p.hashCode() + "\n" + getLocalHost()); - else + } else { System.out.println("Log.printProperties = " + description + ", Size=" + p.size()); + } Object[] pp = p.keySet().toArray(); Arrays.sort(pp); diff --git a/org.adempiere.base/src/org/compiere/util/DB.java b/org.adempiere.base/src/org/compiere/util/DB.java index a6c8bb04bf..8d4f5546b5 100644 --- a/org.adempiere.base/src/org/compiere/util/DB.java +++ b/org.adempiere.base/src/org/compiere/util/DB.java @@ -572,7 +572,7 @@ public final class DB rs= null; pstmt = null; } - log.info("DB_Version=" + version); + if (log.isLoggable(Level.INFO)) log.info("DB_Version=" + version); // Identical DB version if (Adempiere.DB_VERSION.equals(version)) return true; @@ -632,8 +632,10 @@ public final class DB rs= null; pstmt = null; } - log.info("Build DB=" + buildDatabase); - log.info("Build Cl=" + buildClient); + if (log.isLoggable(Level.INFO)){ + log.info("Build DB=" + buildDatabase); + log.info("Build Cl=" + buildClient); + } // Identical DB version if (buildClient.equals(buildDatabase)) return true; diff --git a/org.adempiere.base/src/org/compiere/util/EMail.java b/org.adempiere.base/src/org/compiere/util/EMail.java index a46a44b5db..a704a88b2c 100644 --- a/org.adempiere.base/src/org/compiere/util/EMail.java +++ b/org.adempiere.base/src/org/compiere/util/EMail.java @@ -230,8 +230,10 @@ public final class EMail implements Serializable */ public String send () { - log.info("(" + m_smtpHost + ") " + m_from + " -> " + m_to); - log.info("(m_auth) " + m_auth); + if (log.isLoggable(Level.INFO)){ + log.info("(" + m_smtpHost + ") " + m_from + " -> " + m_to); + log.info("(m_auth) " + m_auth); + } m_sentMsg = null; // diff --git a/org.adempiere.base/src/org/compiere/util/Language.java b/org.adempiere.base/src/org/compiere/util/Language.java index 47880db2d3..78db542651 100644 --- a/org.adempiere.base/src/org/compiere/util/Language.java +++ b/org.adempiere.base/src/org/compiere/util/Language.java @@ -285,7 +285,7 @@ public class Language implements Serializable Locale locale = new Locale(language, country); StringBuilder msglog = new StringBuilder() .append("Adding Language=").append(language).append(", Country=").append(country).append(", Locale=").append(locale); - log.info (msglog.toString()); + if (log.isLoggable(Level.INFO)) log.info (msglog.toString()); Language ll = new Language (lang, lang, locale); // Add to Languages ArrayList list = new ArrayList(Arrays.asList(s_languages)); diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 61fa32cb82..9767e30989 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -241,7 +241,7 @@ public class Login */ private KeyNamePair[] getRoles (String app_user, String app_pwd, boolean force) { - log.info("User=" + app_user); + if (log.isLoggable(Level.INFO)) log.info("User=" + app_user); //long start = System.currentTimeMillis(); if (app_user == null) @@ -706,7 +706,7 @@ public class Login if (!rs.next()) { - log.info("No Warehouses for Org: " + org.toStringX()); + if (log.isLoggable(Level.INFO)) log.info("No Warehouses for Org: " + org.toStringX()); return null; } @@ -779,7 +779,7 @@ public class Login public String loadPreferences (KeyNamePair org, KeyNamePair warehouse, java.sql.Timestamp timestamp, String printerName) { - log.info("Org: " + org.toStringX()); + if (log.isLoggable(Level.INFO)) log.info("Org: " + org.toStringX()); if (m_ctx == null || org == null) throw new IllegalArgumentException("Required parameter missing"); @@ -942,7 +942,7 @@ public class Login } // Default Values - log.info("Default Values ..."); + if (log.isLoggable(Level.INFO)) log.info("Default Values ..."); sql = "SELECT t.TableName, c.ColumnName " + "FROM AD_Column c " + " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID) " @@ -1049,7 +1049,7 @@ public class Login log.severe("User/Password invalid: " + uid); return false; } - log.info("User: " + uid); + if (log.isLoggable(Level.INFO)) log.info("User: " + uid); // Role String role = Ini.getProperty(Ini.P_ROLE); @@ -1065,12 +1065,14 @@ public class Login } if (rolePP == null) { - log.severe("Role invalid: " + role); - for (int i = 0; i < roles.length; i++) - log.info("Option: " + roles[i]); + log.severe("Role invalid: " + role); + if (log.isLoggable(Level.INFO)) { + for (int i = 0; i < roles.length; i++) + log.info("Option: " + roles[i]); + } return false; } - log.info("Role: " + role); + if (log.isLoggable(Level.INFO)) log.info("Role: " + role); // Clients String client = Ini.getProperty(Ini.P_CLIENT); @@ -1092,9 +1094,11 @@ public class Login } if (clientPP == null) { - log.severe("Client invalid: " + client); - for (int i = 0; i < clients.length; i++) - log.info("Option: " + clients[i]); + log.severe("Client invalid: " + client); + if (log.isLoggable(Level.INFO)) { + for (int i = 0; i < clients.length; i++) + log.info("Option: " + clients[i]); + } return false; } @@ -1118,9 +1122,11 @@ public class Login } if (orgPP == null) { - log.severe("Org invalid: " + org); - for (int i = 0; i < orgs.length; i++) - log.info("Option: " + orgs[i]); + log.severe("Org invalid: " + org); + if (log.isLoggable(Level.INFO)) { + for (int i = 0; i < orgs.length; i++) + log.info("Option: " + orgs[i]); + } return false; } String error = validateLogin(orgPP); @@ -1147,9 +1153,11 @@ public class Login } if (whPP == null) { - log.severe("Warehouse invalid: " + wh); - for (int i = 0; i < whs.length; i++) - log.info("Option: " + whs[i]); + log.severe("Warehouse invalid: " + wh); + if (log.isLoggable(Level.INFO)) { + for (int i = 0; i < whs.length; i++) + log.info("Option: " + whs[i]); + } return false; } @@ -1169,7 +1177,7 @@ public class Login loginDate = new java.sql.Timestamp(System.currentTimeMillis()); loadPreferences(orgPP, whPP, loginDate, printerName); // - log.info("complete"); + if (log.isLoggable(Level.INFO)) log.info("complete"); return true; } // batchLogin @@ -1199,7 +1207,7 @@ public class Login * @return client array or null if in error. */ public KeyNamePair[] getClients(String app_user, String app_pwd) { - log.info("User=" + app_user); + if (log.isLoggable(Level.INFO)) log.info("User=" + app_user); if (Util.isEmpty(app_user)) { diff --git a/org.adempiere.base/src/org/compiere/util/Secure.java b/org.adempiere.base/src/org/compiere/util/Secure.java index 6f0473d528..e55ade8063 100644 --- a/org.adempiere.base/src/org/compiere/util/Secure.java +++ b/org.adempiere.base/src/org/compiere/util/Secure.java @@ -234,7 +234,7 @@ public class Secure implements SecureInterface catch (Exception ex) { // log.info("Failed: " + value + " - " + ex.toString()); - log.info("Failed decrypting " + ex.toString()); + if (log.isLoggable(Level.INFO)) log.info("Failed decrypting " + ex.toString()); } } return null; diff --git a/org.adempiere.base/src/org/compiere/util/SecureEngine.java b/org.adempiere.base/src/org/compiere/util/SecureEngine.java index b704663d40..b179b8c10c 100644 --- a/org.adempiere.base/src/org/compiere/util/SecureEngine.java +++ b/org.adempiere.base/src/org/compiere/util/SecureEngine.java @@ -266,18 +266,20 @@ public class SecureEngine init (System.getProperties()); // Ini Test //String ini1 = SecureInterface.CLEARVALUE_START + "test" + SecureInterface.CLEARVALUE_END; - /** - log.info("Decrypt clear test =" + test(decrypt(ini1), "test")); - log.info("Decrypt clear 'test' =" + test(decrypt("'" + ini1 + "'"), "'test'")); - log.info("Decrypt '' =" + test(decrypt("''"), "''")); - log.info("Decrypt =" + test(decrypt(""), "")); - log.info("Decrypt null =" + test(decrypt(null), null)); - log.info("Decrypt test =" + test(decrypt("test"), "test")); - **/ - log.info("Decrypt {test} =" + test(decrypt("af2309f390afed74", 0), "test")); - log.info("Decrypt ~{test}~ =" + test(decrypt(SecureInterface.ENCRYPTEDVALUE_START + "af2309f390afed74" + SecureInterface.ENCRYPTEDVALUE_END, 0), "test")); - - log.info("Encrypt test =" + test(encrypt("test", 0), "af2309f390afed74")); + if (log.isLoggable(Level.INFO)) { + /** + log.info("Decrypt clear test =" + test(decrypt(ini1), "test")); + log.info("Decrypt clear 'test' =" + test(decrypt("'" + ini1 + "'"), "'test'")); + log.info("Decrypt '' =" + test(decrypt("''"), "''")); + log.info("Decrypt =" + test(decrypt(""), "")); + log.info("Decrypt null =" + test(decrypt(null), null)); + log.info("Decrypt test =" + test(decrypt("test"), "test")); + **/ + log.info("Decrypt {test} =" + test(decrypt("af2309f390afed74", 0), "test")); + log.info("Decrypt ~{test}~ =" + test(decrypt(SecureInterface.ENCRYPTEDVALUE_START + "af2309f390afed74" + SecureInterface.ENCRYPTEDVALUE_END, 0), "test")); + + log.info("Encrypt test =" + test(encrypt("test", 0), "af2309f390afed74")); + } diff --git a/org.adempiere.base/src/org/compiere/util/Trx.java b/org.adempiere.base/src/org/compiere/util/Trx.java index 204c760919..e9eda0ae81 100644 --- a/org.adempiere.base/src/org/compiere/util/Trx.java +++ b/org.adempiere.base/src/org/compiere/util/Trx.java @@ -334,7 +334,7 @@ public class Trx if (m_connection != null) { m_connection.rollback(savepoint); - log.info ("**** " + m_trxName); + if (log.isLoggable(Level.INFO)) log.info ("**** " + m_trxName); return true; } } @@ -359,7 +359,7 @@ public class Trx if (m_connection != null) { m_connection.commit(); - log.info ("**** " + m_trxName); + if (log.isLoggable(Level.INFO)) log.info ("**** " + m_trxName); m_active = false; fireAfterCommitEvent(true); return true; diff --git a/org.adempiere.base/src/org/compiere/util/WebEnv.java b/org.adempiere.base/src/org/compiere/util/WebEnv.java index 49a69e7004..7dd30fe746 100644 --- a/org.adempiere.base/src/org/compiere/util/WebEnv.java +++ b/org.adempiere.base/src/org/compiere/util/WebEnv.java @@ -111,7 +111,7 @@ public class WebEnv { if (s_initOK) { - log.info(config.getServletName()); + if (log.isLoggable(Level.INFO)) log.info(config.getServletName()); return true; } @@ -129,7 +129,7 @@ public class WebEnv boolean retValue = initWeb (config.getServletContext()); // Logging now initiated - log.info(info.toString()); + if (log.isLoggable(Level.INFO)) log.info(info.toString()); return retValue; } // initWeb @@ -143,7 +143,7 @@ public class WebEnv { if (s_initOK) { - log.info(context.getServletContextName()); + if (log.isLoggable(Level.INFO)) log.info(context.getServletContextName()); return true; } @@ -177,7 +177,7 @@ public class WebEnv return false; // Logging now initiated - log.info(info.toString()); + if (log.isLoggable(Level.INFO)) log.info(info.toString()); // Properties ctx = new Properties(); MClient client = MClient.get(ctx, 0); diff --git a/org.adempiere.base/src/org/compiere/util/WebInfo.java b/org.adempiere.base/src/org/compiere/util/WebInfo.java index e1c0b5958b..65b563e37f 100644 --- a/org.adempiere.base/src/org/compiere/util/WebInfo.java +++ b/org.adempiere.base/src/org/compiere/util/WebInfo.java @@ -165,7 +165,7 @@ public class WebInfo */ public void setId (int id) { - log.info("ID=" + id); + if (log.isLoggable(Level.INFO)) log.info("ID=" + id); m_id = id; } // setId diff --git a/org.adempiere.base/src/org/compiere/util/WebLogin.java b/org.adempiere.base/src/org/compiere/util/WebLogin.java index e9d713b306..9026245e21 100644 --- a/org.adempiere.base/src/org/compiere/util/WebLogin.java +++ b/org.adempiere.base/src/org/compiere/util/WebLogin.java @@ -218,7 +218,7 @@ public class WebLogin // Login else if ("Login".equals(m_mode)) { - log.info("** login " + m_email + "/" + m_password); + if (log.isLoggable(Level.INFO)) log.info("** login " + m_email + "/" + m_password); // add Cookie WebUtil.addCookieWebUser(m_request, m_response, m_email, COOKIE_NAME); @@ -260,7 +260,7 @@ public class WebLogin // Submit - update/new Contact else if ("Submit".equals(m_mode)) { - log.info("** submit " + m_email + "/" + m_password + " - AddrConf=" + m_addressConfirm); + if (log.isLoggable(Level.INFO)) log.info("** submit " + m_email + "/" + m_password + " - AddrConf=" + m_addressConfirm); // we have a record for address update if (m_wu != null && m_wu.isLoggedIn() && m_addressConfirm) // address update ; @@ -439,7 +439,7 @@ public class WebLogin return false; } - log.info(m_forward + " - " + m_wu.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_forward + " - " + m_wu.toString()); String cmd = WebUtil.getParameter(m_request, "ReSend"); if (cmd != null && cmd.length() > 1) @@ -457,7 +457,7 @@ public class WebLogin return false; } - log.info(m_forward + " - " + m_wu.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_forward + " - " + m_wu.toString()); MBPBankAccount thisBPBankAccount = m_wu.getBankAccount (true); // As this sets bankaccountach diff --git a/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java b/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java index 8bbc21814d..83e7734d36 100644 --- a/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java +++ b/org.adempiere.base/src/org/compiere/util/WebSessionCtx.java @@ -108,7 +108,7 @@ public class WebSessionCtx implements Serializable */ private WebSessionCtx (HttpServletRequest request) { - log.info (request.getContextPath() + " (" + request.getRemoteAddr() + if (log.isLoggable(Level.INFO)) log.info (request.getContextPath() + " (" + request.getRemoteAddr() + " - " + request.getLocale() + ") #" + counter); ctx = new Properties(); setLanguage(request); @@ -143,7 +143,7 @@ public class WebSessionCtx implements Serializable */ private WebSessionCtx (HttpServletRequest request, int W_Store_ID) { - log.info (request.getContextPath() + " (" + request.getRemoteAddr() + if (log.isLoggable(Level.INFO)) log.info (request.getContextPath() + " (" + request.getRemoteAddr() + " - " + request.getLocale() + ") #" + counter); ctx = new Properties(); setLanguage(request); @@ -218,7 +218,7 @@ public class WebSessionCtx implements Serializable wstore = MStore.get(ctx, W_Store_ID); if (wstore.getW_Store_ID() != 0) { - log.info("From web.xml - " + wstore); + if (log.isLoggable(Level.INFO)) log.info("From web.xml - " + wstore); return; } } @@ -249,7 +249,7 @@ public class WebSessionCtx implements Serializable wstore = MStore.get(ctx, W_Store_ID); if (wstore.getW_Store_ID() != 0) { - log.info("From web.xml - " + wstore); + if (log.isLoggable(Level.INFO)) log.info("From web.xml - " + wstore); return; } } @@ -273,7 +273,7 @@ public class WebSessionCtx implements Serializable /** Create New Context */ if (newCtx == null) { - log.info(wstore.getWebContext()); + if (log.isLoggable(Level.INFO)) log.info(wstore.getWebContext()); newCtx = new Properties(); // copy explicitly Enumeration e = ctx.keys(); diff --git a/org.adempiere.base/src/org/compiere/util/WebUser.java b/org.adempiere.base/src/org/compiere/util/WebUser.java index 138a77df97..94ee629dfe 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUser.java +++ b/org.adempiere.base/src/org/compiere/util/WebUser.java @@ -164,7 +164,7 @@ public class WebUser */ private void load (String email, String password) { - log.info(email + " - AD_Client_ID=" + m_AD_Client_ID); + if (log.isLoggable(Level.INFO)) log.info(email + " - AD_Client_ID=" + m_AD_Client_ID); String sql = "SELECT * " + "FROM AD_User " + "WHERE AD_Client_ID=?" @@ -278,7 +278,7 @@ public class WebUser */ private void load (int AD_User_ID) { - log.info("ID=" + AD_User_ID + ", AD_Client_ID=" + m_AD_Client_ID); + if (log.isLoggable(Level.INFO)) log.info("ID=" + AD_User_ID + ", AD_Client_ID=" + m_AD_Client_ID); String sql = "SELECT * " + "FROM AD_User " + "WHERE AD_Client_ID=?" @@ -368,7 +368,7 @@ public class WebUser if (m_loc == null) m_loc = new MLocation (m_ctx, 0, null); // - log.info("= " + m_bp + " - " + m_bpc); + if (log.isLoggable(Level.INFO)) log.info("= " + m_bp + " - " + m_bpc); } // load @@ -442,7 +442,7 @@ public class WebUser public boolean save() { m_saveErrorMessage = null; - log.info("BP.Value=" + m_bp.getValue() + ", Name=" + m_bp.getName()); + if (log.isLoggable(Level.INFO)) log.info("BP.Value=" + m_bp.getValue() + ", Name=" + m_bp.getName()); try { // check if BPartner exists *********************************** diff --git a/org.adempiere.base/src/org/compiere/util/WebUtil.java b/org.adempiere.base/src/org/compiere/util/WebUtil.java index dd4778cb5e..68163fce80 100644 --- a/org.adempiere.base/src/org/compiere/util/WebUtil.java +++ b/org.adempiere.base/src/org/compiere/util/WebUtil.java @@ -746,7 +746,7 @@ public final class WebUtil try { result = URLEncoder.encode(result, enc); - log.info("encode: " + enc); + if (log.isLoggable(Level.INFO)) log.info("encode: " + enc); } catch (Exception ex) { @@ -963,7 +963,7 @@ public final class WebUtil // time = System.currentTimeMillis() - time; double speed = (fileLength/(double)1024) / (time/(double)1000); - log.info("Length=" + if (log.isLoggable(Level.INFO)) log.info("Length=" + fileLength + " - " + time + " ms - " + speed + " kB/sec - " + entry.getContentType()); @@ -1016,7 +1016,7 @@ public final class WebUtil // time = System.currentTimeMillis() - time; double speed = (fileLength/(double)1024) / (time/(double)1000); - log.info("Length=" + if (log.isLoggable(Level.INFO)) log.info("Length=" + fileLength + " - " + time + " ms - " + speed + " kB/sec - " + mimeType); diff --git a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java index a07a7b2413..6aea61a1ae 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFActivity.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFActivity.java @@ -653,7 +653,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable // Starting user MUser user = MUser.get(getCtx(), AD_User_ID); - log.info("For User=" + user + if (log.isLoggable(Level.INFO)) log.info("For User=" + user + ", Amt=" + amount + ", Own=" + ownDocument); @@ -662,7 +662,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable { if (user.equals(oldUser)) { - log.info("Loop - " + user.getName()); + if (log.isLoggable(Level.INFO)) log.info("Loop - " + user.getName()); user=null; break; } @@ -700,7 +700,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable BigDecimal amtApprovedAccum = getAmtAccum(m_po, daysAmtAcc.intValue(), user.getAD_User_ID()); amtApprovedAccum = amtApprovedAccum.add(amount); // include amount of current doc approved = amtApprovedAccum.compareTo(roleAmtAcc) <= 0; - log.info("ApprovedAccum=" + approved + if (log.isLoggable(Level.INFO)) log.info("ApprovedAccum=" + approved + " - User=" + user.getName() + ", Role=" + role.getName() + ", ApprovalAmtAccum=" + roleAmtAcc + ", AccumDocsApproved=" + amtApprovedAccum @@ -830,7 +830,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable */ public void run() { - log.info ("Node=" + getNode()); + if (log.isLoggable(Level.INFO)) log.info ("Node=" + getNode()); m_newValue = null; @@ -950,7 +950,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable */ private boolean performWork (Trx trx) throws Exception { - log.info (m_node + " [" + (trx!=null ? trx.getTrxName() : "") + "]"); + if (log.isLoggable(Level.INFO)) log.info (m_node + " [" + (trx!=null ? trx.getTrxName() : "") + "]"); m_docStatus = null; if (m_node.getPriority() != 0) // overwrite priority if defined setPriority(m_node.getPriority()); @@ -1703,7 +1703,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable } } else - log.info("No EMail for User " + user.getName()); + if (log.isLoggable(Level.INFO)) log.info("No EMail for User " + user.getName()); } else if (email != null && email.length() > 0) { diff --git a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java index 6c1fecd759..1db153fde8 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFProcess.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFProcess.java @@ -257,7 +257,7 @@ public class MWFProcess extends X_AD_WF_Process public void checkActivities(String trxName, PO lastPO) { this.set_TrxName(trxName); // ensure process is working on the same transaction - log.info("(" + getAD_Workflow_ID() + ") - " + getWFState() + if (log.isLoggable(Level.INFO)) log.info("(" + getAD_Workflow_ID() + ") - " + getWFState() + (trxName == null ? "" : "[" + trxName + "]")); if (m_state.isClosed()) return; diff --git a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java index ef3808db89..24bdc4fa9d 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWorkflow.java +++ b/org.adempiere.base/src/org/compiere/wf/MWorkflow.java @@ -851,7 +851,7 @@ public class MWorkflow extends X_AD_Workflow boolean valid = errors.length() == 0; setIsValid(valid); if (!valid) - log.info("validate: " + errors); + if (log.isLoggable(Level.INFO)) log.info("validate: " + errors); return errors.toString(); } // validate diff --git a/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java b/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java index 61d3922d23..25aa5eafc3 100644 --- a/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java +++ b/org.adempiere.base/src/org/compiere/wf/WFActivityManage.java @@ -71,7 +71,7 @@ public class WFActivityManage extends SvrProcess protected String doIt() throws Exception { MWFActivity activity = new MWFActivity (getCtx(), p_AD_WF_Activity_ID, get_TrxName()); - log.info("doIt - " + activity); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + activity); MUser user = MUser.get(getCtx(), getAD_User_ID()); // Abort diff --git a/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java b/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java index 024bd2d8f1..46c631d517 100644 --- a/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java +++ b/org.adempiere.base/src/org/compiere/wf/WFProcessManage.java @@ -71,7 +71,7 @@ public class WFProcessManage extends SvrProcess protected String doIt() throws Exception { MWFProcess process = new MWFProcess (getCtx(), p_AD_WF_Process_ID, get_TrxName()); - log.info("doIt - " + process); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + process); MUser user = MUser.get(getCtx(), getAD_User_ID()); // Abort diff --git a/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java b/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java index 15ba2b118c..6d049e7c6c 100644 --- a/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java +++ b/org.adempiere.base/src/org/compiere/wf/WorkflowMoveToClient.java @@ -63,7 +63,7 @@ public class WorkflowMoveToClient extends SvrProcess */ protected String doIt () throws Exception { - log.info("doIt - AD_Client_ID=" + p_AD_Client_ID + ", AD_Workflow_ID=" + p_AD_Workflow_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - AD_Client_ID=" + p_AD_Client_ID + ", AD_Workflow_ID=" + p_AD_Workflow_ID); int changes = 0; // WF diff --git a/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java b/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java index c3fc813e77..035d281248 100644 --- a/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java +++ b/org.adempiere.base/src/org/compiere/wf/WorkflowValidate.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.wf; +import java.util.logging.Level; + import org.compiere.process.SvrProcess; import org.compiere.util.AdempiereUserError; import org.compiere.util.Msg; @@ -47,7 +49,7 @@ public class WorkflowValidate extends SvrProcess protected String doIt () throws Exception { MWorkflow wf = MWorkflow.get (getCtx(), p_AD_Worlflow_ID); - log.info("WF=" + wf); + if (log.isLoggable(Level.INFO)) log.info("WF=" + wf); String msg = wf.validate(); wf.saveEx(); diff --git a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java index d99c38bbf3..b97fdcc78b 100644 --- a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java +++ b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java @@ -749,7 +749,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean unlockIt() { - log.info("unlockIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("unlockIt - " + toString()); setProcessing(false); return true; } // unlockIt @@ -760,7 +760,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean invalidateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); setDocAction(DOCACTION_Prepare); return true; } // invalidateIt @@ -772,7 +772,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public String prepareIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_PREPARE); if (m_processMsg != null) return DocAction.STATUS_Invalid; @@ -914,7 +914,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean approveIt() { - log.info("approveIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("approveIt - " + toString()); setIsApproved(true); return true; } // approveIt @@ -925,7 +925,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean rejectIt() { - log.info("rejectIt - " + toString()); + if (log.isLoggable(Level.INFO)) log.info("rejectIt - " + toString()); setIsApproved(false); return true; } // rejectIt @@ -963,7 +963,7 @@ public class MDDOrder extends X_DD_Order implements DocAction if (!isApproved()) approveIt(); getLines(true,null); - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); StringBuilder info = new StringBuilder(); String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); if (valid != null) @@ -989,7 +989,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean voidIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID); if (m_processMsg != null) @@ -1030,7 +1030,7 @@ public class MDDOrder extends X_DD_Order implements DocAction if (!isSOTrx()) return true; - log.info("createReversals"); + if (log.isLoggable(Level.INFO)) log.info("createReversals"); StringBuffer info = new StringBuffer(); // Reverse All *Shipments* @@ -1111,7 +1111,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean closeIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before Close m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE); if (m_processMsg != null) @@ -1149,7 +1149,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean reverseCorrectIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) @@ -1169,7 +1169,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean reverseAccrualIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reverseAccrual m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL); if (m_processMsg != null) @@ -1189,7 +1189,7 @@ public class MDDOrder extends X_DD_Order implements DocAction */ public boolean reActivateIt() { - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) diff --git a/org.adempiere.base/src/org/eevolution/model/MPPProductPlanning.java b/org.adempiere.base/src/org/eevolution/model/MPPProductPlanning.java index 149832af98..66c80ee594 100644 --- a/org.adempiere.base/src/org/eevolution/model/MPPProductPlanning.java +++ b/org.adempiere.base/src/org/eevolution/model/MPPProductPlanning.java @@ -18,6 +18,7 @@ package org.eevolution.model; import java.sql.ResultSet; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; import org.compiere.model.MOrgInfo; @@ -113,7 +114,7 @@ public class MPPProductPlanning extends X_PP_Product_Planning int m_warehouse_id, int s_resource_id, int m_product_id, String trxname) { - log.info("AD_Client_ID=" + ad_client_id + " AD_Org_ID=" + ad_org_id + " M_Product_ID=" + m_product_id + " M_Warehouse_ID=" + m_warehouse_id + " S_Resource_ID=" + s_resource_id ); + if (log.isLoggable(Level.INFO)) log.info("AD_Client_ID=" + ad_client_id + " AD_Org_ID=" + ad_org_id + " M_Product_ID=" + m_product_id + " M_Warehouse_ID=" + m_warehouse_id + " S_Resource_ID=" + s_resource_id ); String sql_warehouse = COLUMNNAME_M_Warehouse_ID+"=?"; if(m_warehouse_id == 0) { diff --git a/org.adempiere.base/src/org/eevolution/process/BankTransfer.java b/org.adempiere.base/src/org/eevolution/process/BankTransfer.java index cec01302b0..c85a9f2374 100644 --- a/org.adempiere.base/src/org/eevolution/process/BankTransfer.java +++ b/org.adempiere.base/src/org/eevolution/process/BankTransfer.java @@ -93,7 +93,7 @@ public class BankTransfer extends SvrProcess */ protected String doIt() throws Exception { - log.info("From Bank="+p_From_C_BankAccount_ID+" - To Bank="+p_To_C_BankAccount_ID + if (log.isLoggable(Level.INFO)) log.info("From Bank="+p_From_C_BankAccount_ID+" - To Bank="+p_To_C_BankAccount_ID + " - C_BPartner_ID="+p_C_BPartner_ID+"- C_Charge_ID= "+p_C_Charge_ID+" - Amount="+p_Amount+" - DocumentNo="+p_DocumentNo + " - Description="+p_Description+ " - Statement Date="+p_StatementDate+ " - Date Account="+p_DateAcct); diff --git a/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java b/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java index b19fd24f0e..9886ef65a0 100644 --- a/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java +++ b/org.adempiere.base/src/org/eevolution/process/CopyFromBOM.java @@ -62,7 +62,7 @@ public class CopyFromBOM extends SvrProcess { protected String doIt() throws Exception { - log.info("From PP_Product_BOM_ID=" + p_PP_Product_BOM_ID + " to " + p_Record_ID); + if (log.isLoggable(Level.INFO)) log.info("From PP_Product_BOM_ID=" + p_PP_Product_BOM_ID + " to " + p_Record_ID); if (p_Record_ID == 0) throw new IllegalArgumentException("Target PP_Product_BOM_ID == 0"); if (p_PP_Product_BOM_ID == 0) diff --git a/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java b/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java index 7519d2e5af..a78d45e063 100644 --- a/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java +++ b/org.adempiere.base/src/org/eevolution/process/ExportFormatGenerator.java @@ -119,7 +119,7 @@ public class ExportFormatGenerator extends SvrProcess private String createFormat(MTable table) throws Exception { - log.info("Table Name:"+table.getTableName()); + if (log.isLoggable(Level.INFO)) log.info("Table Name:"+table.getTableName()); MColumn[] cols = table.getColumns(true); String unique = null; for(MColumn col : cols) @@ -127,7 +127,7 @@ public class ExportFormatGenerator extends SvrProcess if(col.isIdentifier() && col.getSeqNo() == 1) { unique = col.getColumnName(); - log.info("Unique Key"+unique); + if (log.isLoggable(Level.INFO)) log.info("Unique Key"+unique); break; } } @@ -138,7 +138,7 @@ public class ExportFormatGenerator extends SvrProcess MEXPFormat format = null; //String formatValue = table.getTableName()+"_"+unique; String formatValue = table.getTableName(); - log.info("Export Format Value:"+formatValue); + if (log.isLoggable(Level.INFO)) log.info("Export Format Value:"+formatValue); format = (MEXPFormat) m_formats.get(formatValue); if (format != null) return format.getValue(); @@ -265,7 +265,7 @@ public class ExportFormatGenerator extends SvrProcess embededformatLine.saveEx(); } } - log.info("Export Format Line:"+formatLine.getName()); + if (log.isLoggable(Level.INFO)) log.info("Export Format Line:"+formatLine.getName()); return formatLine.getEXP_FormatLine_ID(); } else @@ -324,11 +324,11 @@ public class ExportFormatGenerator extends SvrProcess { String tableName = col.getColumnName().substring(0, col.getColumnName().lastIndexOf("_ID")); - log.info("Table Name:"+tableName); + if (log.isLoggable(Level.INFO)) log.info("Table Name:"+tableName); if(tableName==null) { - log.info("Table Name: null"); + if (log.isLoggable(Level.INFO)) log.info("Table Name: null"); return 0; } @@ -348,7 +348,7 @@ public class ExportFormatGenerator extends SvrProcess } formatLine.setAD_Column_ID(col.getAD_Column_ID()); formatLine.saveEx(); - log.info("Export Format Line:"+formatLine.getName()); + if (log.isLoggable(Level.INFO)) log.info("Export Format Line:"+formatLine.getName()); return formatLine.getEXP_FormatLine_ID(); } } // Generate Export Format diff --git a/org.adempiere.base/src/org/globalqss/process/CashFlow.java b/org.adempiere.base/src/org/globalqss/process/CashFlow.java index 9234078396..3bf574687a 100644 --- a/org.adempiere.base/src/org/globalqss/process/CashFlow.java +++ b/org.adempiere.base/src/org/globalqss/process/CashFlow.java @@ -113,7 +113,7 @@ public class CashFlow extends SvrProcess { cfini.setC_ElementValue_ID(p_C_ElementValue_ID); if (!cfini.save()) throw new AdempiereSystemError("Error saving cash flow ini"); - log.info("Initial balance calculated = " + initialBalance); + if (log.isLoggable(Level.INFO)) log.info("Initial balance calculated = " + initialBalance); /* plan records */ String sqlPlan = "SELECT cpl.AD_Org_ID, " + @@ -177,7 +177,7 @@ public class CashFlow extends SvrProcess { if (!cfplan.save()) throw new AdempiereSystemError("Error saving cash flow plan"); } - log.info(noPlan + " plan inserted"); + if (log.isLoggable(Level.INFO)) log.info(noPlan + " plan inserted"); } catch (Exception e) { @@ -209,7 +209,7 @@ public class CashFlow extends SvrProcess { { noOrders++; if ((noOrders % 100) == 0) - log.info(noOrders + " orders processed"); + if (log.isLoggable(Level.INFO)) log.info(noOrders + " orders processed"); int order_id = rsOpenOrders.getInt("C_Order_ID"); boolean isPaySchedule = ("Y".equals(rsOpenOrders.getString("IsPayScheduleValid"))); BigDecimal pending = rsOpenOrders.getBigDecimal("Pending"); @@ -302,7 +302,7 @@ public class CashFlow extends SvrProcess { } } } - log.info(noOrders + " orders processed, " + noOrdIns + " orders inserted, " + noOrdSchIns + " schedule inserted"); + if (log.isLoggable(Level.INFO)) log.info(noOrders + " orders processed, " + noOrdIns + " orders inserted, " + noOrdSchIns + " schedule inserted"); } catch (Exception e) { @@ -359,7 +359,7 @@ public class CashFlow extends SvrProcess { if (!cfactual.save()) throw new AdempiereSystemError("Error saving cash flow actual"); } - log.info(noInv + " invoices inserted"); + if (log.isLoggable(Level.INFO)) log.info(noInv + " invoices inserted"); } catch (Exception e) { @@ -391,7 +391,7 @@ public class CashFlow extends SvrProcess { X_T_CashFlow.CASHFLOWSOURCE_2_Plan, X_T_CashFlow.CASHFLOWSOURCE_3_CommitmentsOrders}, false, get_TrxName()); - log.info(noupdord + " plans subtracted from orders"); + if (log.isLoggable(Level.INFO)) log.info(noupdord + " plans subtracted from orders"); /* subtract from plan lines the related invoices */ String sqlupdinv = "UPDATE T_CashFlow " + @@ -413,7 +413,7 @@ public class CashFlow extends SvrProcess { X_T_CashFlow.CASHFLOWSOURCE_2_Plan, X_T_CashFlow.CASHFLOWSOURCE_4_ActualDebtInvoices}, false, get_TrxName()); - log.info(noupdinv + " plans subtracted from invoices"); + if (log.isLoggable(Level.INFO)) log.info(noupdinv + " plans subtracted from invoices"); /* delete overplanned records */ String sqldeloverplanned = "DELETE FROM T_CashFlow " + @@ -424,7 +424,7 @@ public class CashFlow extends SvrProcess { new Object[] {getAD_PInstance_ID(), X_T_CashFlow.CASHFLOWSOURCE_2_Plan}, false, get_TrxName()); - log.info(nodelplan + " overplanned plans deleted"); + if (log.isLoggable(Level.INFO)) log.info(nodelplan + " overplanned plans deleted"); return "OK"; } // doIt diff --git a/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java b/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java index b90c1d7939..20626e0c48 100644 --- a/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java +++ b/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java @@ -122,7 +122,7 @@ public class GLJournalGenerate extends SvrProcess */ protected String doIt() throws Exception { - log.info("QSS_Journal_Generator_ID=" + p_QSS_JournalGenerator_ID + if (log.isLoggable(Level.INFO)) log.info("QSS_Journal_Generator_ID=" + p_QSS_JournalGenerator_ID + ", ProcessingDate=" + p_ProcessingDateFrom + "/" + p_ProcessingDateTo + ", DateAcct=" + p_DateAcct + ", IsSimulation=" + p_IsSimulation diff --git a/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java b/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java index 872a85d0a4..8348884728 100644 --- a/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java +++ b/org.adempiere.base/src/org/idempiere/fa/model/CalloutAsset.java @@ -7,6 +7,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Properties; +import java.util.logging.Level; import org.compiere.model.CalloutEngine; import org.compiere.model.GridField; @@ -105,7 +106,7 @@ public class CalloutAsset extends CalloutEngine { } catch (SQLException e) { - log.info("PeriodType "+ e); + if (log.isLoggable(Level.INFO)) log.info("PeriodType "+ e); return e.getLocalizedMessage(); } finally @@ -171,7 +172,7 @@ public class CalloutAsset extends CalloutEngine { } catch (SQLException e) { - log.info("PeriodType "+ e); + if (log.isLoggable(Level.INFO)) log.info("PeriodType "+ e); return e.getLocalizedMessage(); } finally diff --git a/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java b/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java index 96bab111a8..2c5a890a8e 100644 --- a/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java +++ b/org.adempiere.base/src/org/idempiere/fa/model/ModelValidator.java @@ -4,6 +4,7 @@ package org.idempiere.fa.model; import java.util.List; +import java.util.logging.Level; import org.adempiere.exceptions.FillMandatoryException; import org.compiere.acct.Fact; @@ -98,7 +99,7 @@ implements org.compiere.model.ModelValidator, org.compiere.model.FactsValidator public String docValidate(PO po, int timing) { - log.info(po.get_TableName() + " Timing: " + timing); + if (log.isLoggable(Level.INFO)) log.info(po.get_TableName() + " Timing: " + timing); String result = null; // TABLE C_Invoice diff --git a/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java b/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java index 8d512d556c..5bb7979781 100644 --- a/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java +++ b/org.adempiere.base/src/org/idempiere/fa/process/ImportFixedAsset.java @@ -104,7 +104,7 @@ public class ImportFixedAsset extends SvrProcess + " I_IsImported = 'N' " + "WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.info ("Reset=" + no); + if (log.isLoggable(Level.INFO)) log.info ("Reset=" + no); // Check if Org is Null or 0 sql = new StringBuffer ("UPDATE "+MIFixedAsset.Table_Name+" ifa " diff --git a/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java b/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java index 31993f6894..e5360b402f 100644 --- a/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java +++ b/org.adempiere.base/src/org/idempiere/fa/process/ProjectCreateAsset.java @@ -94,7 +94,7 @@ public class ProjectCreateAsset extends SvrProcess } MProject project = new MProject (getCtx(), m_C_Project_ID, get_TrxName()); - log.info("doIt - " + project); + if (log.isLoggable(Level.INFO)) log.info("doIt - " + project); MProduct product = new MProduct(getCtx(), m_Product_ID, get_TrxName()); MProductCategory pc = MProductCategory.get(getCtx(), product.getM_Product_Category_ID()); diff --git a/org.adempiere.extend/src/compiere/model/MyValidator.java b/org.adempiere.extend/src/compiere/model/MyValidator.java index a33614ab55..bb4b768ffd 100644 --- a/org.adempiere.extend/src/compiere/model/MyValidator.java +++ b/org.adempiere.extend/src/compiere/model/MyValidator.java @@ -16,6 +16,8 @@ *****************************************************************************/ package compiere.model; +import java.util.logging.Level; + import org.compiere.model.MClient; import org.compiere.model.MOrder; import org.compiere.model.MRole; @@ -61,10 +63,10 @@ public class MyValidator implements ModelValidator //client = null for global validator if (client != null) { m_AD_Client_ID = client.getAD_Client_ID(); - log.info(client.toString()); + if (log.isLoggable(Level.INFO)) log.info(client.toString()); } else { - log.info("Initializing global validator: "+this.toString()); + if (log.isLoggable(Level.INFO)) log.info("Initializing global validator: "+this.toString()); } // We want to be informed when C_Order is created/changed @@ -88,7 +90,7 @@ public class MyValidator implements ModelValidator { @SuppressWarnings("unused") MOrder order = (MOrder)po; - log.info(po.toString()); + if (log.isLoggable(Level.INFO)) log.info(po.toString()); } return null; } // modelChange @@ -104,7 +106,7 @@ public class MyValidator implements ModelValidator */ public String docValidate (PO po, int timing) { - log.info(po.get_TableName() + " Timing: "+timing); + if (log.isLoggable(Level.INFO)) log.info(po.get_TableName() + " Timing: "+timing); // Ignore all after Complete events if (timing == TIMING_AFTER_COMPLETE) @@ -119,7 +121,7 @@ public class MyValidator implements ModelValidator if (error != null) return error; /** Order Discount Example */ - log.info(po.toString()); + if (log.isLoggable(Level.INFO)) log.info(po.toString()); } } @@ -171,7 +173,7 @@ public class MyValidator implements ModelValidator if (!discountLine.save()) return "Could not save discount line"; - log.info(discountLine.toString()); + if (log.isLoggable(Level.INFO)) log.info(discountLine.toString()); order.getLines(true, null); return null; } // orderDiscount*/ @@ -188,7 +190,7 @@ public class MyValidator implements ModelValidator */ public String login (int AD_Org_ID, int AD_Role_ID, int AD_User_ID) { - log.info("AD_User_ID=" + AD_User_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_User_ID=" + AD_User_ID); m_AD_User_ID = AD_User_ID; m_AD_Role_ID = AD_Role_ID; return null; diff --git a/org.adempiere.extend/src/org/compiere/test/OrderTest.java b/org.adempiere.extend/src/org/compiere/test/OrderTest.java index 5e39f58c3e..f0d7d4b0db 100644 --- a/org.adempiere.extend/src/org/compiere/test/OrderTest.java +++ b/org.adempiere.extend/src/org/compiere/test/OrderTest.java @@ -124,7 +124,7 @@ public class OrderTest implements Runnable trx.commit(); trx.close(); // - log.info(order.toString()); + if (log.isLoggable(Level.INFO)) log.info(order.toString()); } time = System.currentTimeMillis() - time; log.warning("#" + m_no + ", Errors=" + m_errors diff --git a/org.adempiere.extend/src/test/functional/AlertTest.java b/org.adempiere.extend/src/test/functional/AlertTest.java index 07a4f6b744..a27b29a0bb 100644 --- a/org.adempiere.extend/src/test/functional/AlertTest.java +++ b/org.adempiere.extend/src/test/functional/AlertTest.java @@ -28,6 +28,8 @@ ***********************************************************************/ package test.functional; +import java.util.logging.Level; + import org.compiere.model.MAlert; import org.compiere.model.MAlertProcessor; import org.compiere.model.MAlertProcessorLog; @@ -55,20 +57,20 @@ public class AlertTest extends AdempiereTestCase */ public void testAlertCreation() throws Exception { - log.info("trx = " + getTrxName()); + if (log.isLoggable(Level.INFO)) log.info("trx = " + getTrxName()); boolean resultSave = false; //----- Old way: MAlert alertOldWay = new MAlert(Env.getCtx(), 100, getTrxName()); - log.info(alertOldWay.toString()); + if (log.isLoggable(Level.INFO)) log.info(alertOldWay.toString()); X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), getTrxName()); - log.info("alertProcessorOldWay.getAD_AlertProcessor_ID = " + alertProcessorOldWay.getAD_AlertProcessor_ID()); + if (log.isLoggable(Level.INFO)) log.info("alertProcessorOldWay.getAD_AlertProcessor_ID = " + alertProcessorOldWay.getAD_AlertProcessor_ID()); alertOldWay.setDescription("Trifon test"); //--- Save; resultSave = alertOldWay.save(); - log.info("resultSave = " + resultSave); + if (log.isLoggable(Level.INFO)) log.info("resultSave = " + resultSave); System.out.println("New value of Description = " + alertOldWay.getDescription()); diff --git a/org.adempiere.install/src/org/compiere/install/ConfigAppServer.java b/org.adempiere.install/src/org/compiere/install/ConfigAppServer.java index a2dc8f0b57..b3e3a026da 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigAppServer.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigAppServer.java @@ -17,6 +17,7 @@ package org.compiere.install; import java.net.InetAddress; +import java.util.logging.Level; /** @@ -74,7 +75,7 @@ public class ConfigAppServer extends Config pass, true, error); if (!pass) return error; - log.info("OK: AppsServer = " + appsServer); + if (log.isLoggable(Level.INFO)) log.info("OK: AppsServer = " + appsServer); setProperty(ConfigurationData.ADEMPIERE_APPS_SERVER, appsServer.getHostName()); // Web Port @@ -87,7 +88,7 @@ public class ConfigAppServer extends Config pass, true, error); if (!pass) return error; - log.info("OK: Web Port = " + WebPort); + if (log.isLoggable(Level.INFO)) log.info("OK: Web Port = " + WebPort); setProperty(ConfigurationData.ADEMPIERE_WEB_PORT, String.valueOf(WebPort)); // SSL Port @@ -100,7 +101,7 @@ public class ConfigAppServer extends Config pass, true, error); if (!pass) return error; - log.info("OK: SSL Port = " + sslPort); + if (log.isLoggable(Level.INFO)) log.info("OK: SSL Port = " + sslPort); setProperty(ConfigurationData.ADEMPIERE_SSL_PORT, String.valueOf(sslPort)); // return null; diff --git a/org.adempiere.install/src/org/compiere/install/ConfigVM.java b/org.adempiere.install/src/org/compiere/install/ConfigVM.java index 8888587c0e..d2c4044d8e 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigVM.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigVM.java @@ -17,6 +17,7 @@ package org.compiere.install; import java.io.File; +import java.util.logging.Level; import org.compiere.util.CLogMgt; @@ -69,7 +70,7 @@ public class ConfigVM extends Config if (CLogMgt.isLevelFinest()) CLogMgt.printProperties(System.getProperties(), "System", true); // - log.info("OK: JavaHome=" + javaHome.getAbsolutePath()); + if (log.isLoggable(Level.INFO)) log.info("OK: JavaHome=" + javaHome.getAbsolutePath()); setProperty(ConfigurationData.JAVA_HOME, javaHome.getAbsolutePath()); System.setProperty(ConfigurationData.JAVA_HOME, javaHome.getAbsolutePath()); @@ -82,7 +83,7 @@ public class ConfigVM extends Config if (!pass && thisJV.indexOf(VERSION2) != -1) pass = true; if (pass) - log.info("OK: Version=" + thisJV); + if (log.isLoggable(Level.INFO)) log.info("OK: Version=" + thisJV); error = "Wrong Java Version: Should be " + VERSION + " and above."; if (getPanel() != null) diff --git a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java index 5e2e7549fa..0c9d98f2b1 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java @@ -235,7 +235,7 @@ public class ConfigurationData { log.warning(e.toString()); } - log.info(env.toString()); + if (log.isLoggable(Level.INFO)) log.info(env.toString()); if (p_properties.size() > 5) envLoaded = true; @@ -440,7 +440,7 @@ public class ConfigurationData pass, true, error); if (!pass) return error; - log.info("OK: AdempiereHome = " + m_adempiereHome); + if (log.isLoggable(Level.INFO)) log.info("OK: AdempiereHome = " + m_adempiereHome); p_properties.setProperty(IDEMPIERE_HOME, m_adempiereHome.getAbsolutePath()); System.setProperty(IDEMPIERE_HOME, m_adempiereHome.getAbsolutePath()); @@ -478,7 +478,7 @@ public class ConfigurationData pass, true, error); if (!pass) return error; - log.info("OK: KeyStore = " + fileName); + if (log.isLoggable(Level.INFO)) log.info("OK: KeyStore = " + fileName); return null; } // testAdempiere @@ -551,7 +551,7 @@ public class ConfigurationData pass, false, error); if (pass) { - log.info("OK: EMail = " + adminEMail); + if (log.isLoggable(Level.INFO)) log.info("OK: EMail = " + adminEMail); p_properties.setProperty(ADEMPIERE_ADMIN_EMAIL, adminEMail.toString()); p_properties.setProperty(ADEMPIERE_MAIL_USER, mailUser); p_properties.setProperty(ADEMPIERE_MAIL_PASSWORD, mailPassword); @@ -623,7 +623,7 @@ public class ConfigurationData email.createAuthenticator (mailUser, mailPassword); if (EMail.SENT_OK.equals (email.send ())) { - log.info("OK: Send Test Email to " + adminEMail); + if (log.isLoggable(Level.INFO)) log.info("OK: Send Test Email to " + adminEMail); } else { @@ -682,7 +682,7 @@ public class ConfigurationData log.config("Store - connected"); Folder folder = store.getDefaultFolder(); Folder inbox = folder.getFolder("INBOX"); - log.info("OK: Mail Connect to " + inbox.getFullName() + " #Msg=" + inbox.getMessageCount()); + if (log.isLoggable(Level.INFO)) log.info("OK: Mail Connect to " + inbox.getFullName() + " #Msg=" + inbox.getMessageCount()); // store.close(); } diff --git a/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java b/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java index eea526b75b..ecacf20b3a 100644 --- a/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java +++ b/org.adempiere.install/src/org/compiere/install/KeyStoreMgt.java @@ -430,7 +430,7 @@ public class KeyStoreMgt */ public static void keytool(String cmd) { - log.info("keytool " + cmd); + if (log.isLoggable(Level.INFO)) log.info("keytool " + cmd); ArrayList list = new ArrayList(); StringTokenizer st = new StringTokenizer(cmd, " "); String quoteBuffer = null; diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/AdElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/AdElementHandler.java index 2b5294afa3..7d498452de 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/AdElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/AdElementHandler.java @@ -19,6 +19,7 @@ package org.adempiere.pipo2.handler; import java.util.ArrayList; import java.util.List; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -137,7 +138,7 @@ public class AdElementHandler extends AbstractElementHandler { } catch(Exception e) { - log.info(e.toString()); + if (log.isLoggable(Level.INFO)) log.info(e.toString()); } document.endElement("", "", "AD_Element"); diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java index 8baddc4e64..a68a2cfff7 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CodeSnippetElementHandler.java @@ -28,6 +28,7 @@ import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -100,7 +101,7 @@ public class CodeSnippetElementHandler extends AbstractElementHandler { targetDirectoryModified = fullDirectory.replace(slash2,slash1); File file = new File(targetDirectoryModified+sourceName); - log.info(targetDirectoryModified+sourceName); + if (log.isLoggable(Level.INFO)) log.info(targetDirectoryModified+sourceName); //TODO: derived force from user parameter boolean force = true; // check to see if overwrites are allowed @@ -112,13 +113,13 @@ public class CodeSnippetElementHandler extends AbstractElementHandler { //backup file to package directory else { action = "Update"; - log.info("Target Backup:"+targetDirectoryModified+sourceName); + if (log.isLoggable(Level.INFO)) log.info("Target Backup:"+targetDirectoryModified+sourceName); source = OpenInputfile(targetDirectoryModified+sourceName); SimpleDateFormat formatter_file = new SimpleDateFormat("yyMMddHHmmssSSSSZ"); Date today = new Date(); fileDate = formatter_file.format(today); copy = OpenOutputfile(packagePath+File.separator+"backup"+File.separator+fileDate+"_"+sourceName); - log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+sourceName); + if (log.isLoggable(Level.INFO)) log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+sourceName); copyFile (source,copy); log.info("Backup Complete"); } @@ -132,14 +133,14 @@ public class CodeSnippetElementHandler extends AbstractElementHandler { try { logImportDetail (ctx, impDetail, 1, sourceName, 0, action); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } else{ try { logImportDetail (ctx, impDetail, 0, sourceName, 0, action); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java index 04e2318558..742568d0dc 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/CommonTranslationHandler.java @@ -5,6 +5,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -53,7 +54,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements String language = getStringValue(element, "AD_Language"); - log.info(elementValue+" "+getStringValue(element, "Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+getStringValue(element, "Name")); if(isRecordExists(elementValue, parentID, language, ctx)){ updateTranslation(elementValue, parentID, ctx, element); diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/DistFileElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/DistFileElementHandler.java index f3ea3b23b9..e8074073e8 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/DistFileElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/DistFileElementHandler.java @@ -22,6 +22,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -117,13 +118,13 @@ public class DistFileElementHandler extends AbstractElementHandler { //backup file to package directory else { action = "Update"; - log.info("Target Backup:"+fullTargetPath+fileName); + if (log.isLoggable(Level.INFO)) log.info("Target Backup:"+fullTargetPath+fileName); inputStream = OpenInputfile(fullTargetPath+fileName); SimpleDateFormat formatter_file = new SimpleDateFormat("yyMMddHHmmssSSSSZ"); Date today = new Date(); fileDate = formatter_file.format(today); outputStream = OpenOutputfile(packagePath+File.separator+"backup"+File.separator+fileDate+"_"+fileName); - log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+fileName); + if (log.isLoggable(Level.INFO)) log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+fileName); copyFile (inputStream, outputStream); log.info("Backup Complete"); } @@ -154,14 +155,14 @@ public class DistFileElementHandler extends AbstractElementHandler { try { logImportDetail (ctx, impDetail, 1, fileName, 0, action); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } else{ try { logImportDetail (ctx, impDetail, 0, fileName, 0, action); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } //Record in transaction file diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/FieldGroupElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/FieldGroupElementHandler.java index b05aa06bab..70d9b68879 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/FieldGroupElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/FieldGroupElementHandler.java @@ -19,6 +19,7 @@ package org.adempiere.pipo2.handler; import java.util.ArrayList; import java.util.List; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -47,7 +48,7 @@ public class FieldGroupElementHandler extends AbstractElementHandler { String elementValue = element.getElementValue(); String action = null; - log.info(elementValue + " " + getStringValue(element, "Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + getStringValue(element, "Name")); String entitytype = getStringValue(element, "EntityType"); String name = getStringValue(element, "Name"); @@ -144,7 +145,7 @@ public class FieldGroupElementHandler extends AbstractElementHandler { } catch(Exception e) { - log.info(e.toString()); + if (log.isLoggable(Level.INFO)) log.info(e.toString()); } document.endElement("", "", I_AD_FieldGroup.Table_Name); } diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java index b115ae2865..3663b782b0 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.List; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -187,7 +188,7 @@ public class GenericPOElementHandler extends AbstractElementHandler { if (idxet >= 0) { String entityType = (String) po.get_Value(idxet); if (! isProcessElement(ctx.ctx, entityType)) { - log.info("Generic PO not processed as it's official " + po.toString()); + if (log.isLoggable(Level.INFO)) log.info("Generic PO not processed as it's official " + po.toString()); element.skip = true; return; } diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java index c47ff19ce9..d5d93de1b1 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/MenuElementHandler.java @@ -94,14 +94,14 @@ public class MenuElementHandler extends AbstractElementHandler { logImportDetail(ctx, impDetail, 1, mMenu.getName(), mMenu .get_ID(), action); } catch (SAXException e) { - log.info("setmenu:" + e); + if (log.isLoggable(Level.INFO)) log.info("setmenu:" + e); } } else { try { logImportDetail(ctx, impDetail, 0, mMenu.getName(), mMenu .get_ID(), action); } catch (SAXException e) { - log.info("setmenu:" + e); + if (log.isLoggable(Level.INFO)) log.info("setmenu:" + e); } } diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/SQLStatementElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/SQLStatementElementHandler.java index 5308f18350..cdae44cef7 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/SQLStatementElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/SQLStatementElementHandler.java @@ -57,10 +57,10 @@ public class SQLStatementElementHandler extends AbstractElementHandler { pstmt = DB.prepareStatement(sql, getTrxName(ctx)); if (DBType.equals("ALL")) { int n = pstmt.executeUpdate(); - log.info("Executed SQL Statement: "+ getStringValue(element, "statement") + " ReturnValue="+n); + if (log.isLoggable(Level.INFO)) log.info("Executed SQL Statement: "+ getStringValue(element, "statement") + " ReturnValue="+n); } else if (DB.isOracle() == true && DBType.equals("Oracle")) { int n = pstmt.executeUpdate(); - log.info("Executed SQL Statement for Oracle: "+ getStringValue(element, "statement") + " ReturnValue="+n); + if (log.isLoggable(Level.INFO)) log.info("Executed SQL Statement for Oracle: "+ getStringValue(element, "statement") + " ReturnValue="+n); } else if (DB.isPostgreSQL() && ( DBType.equals("Postgres") || DBType.equals("PostgreSQL") // backward compatibility with old packages developed by hand @@ -76,7 +76,7 @@ public class SQLStatementElementHandler extends AbstractElementHandler { try { stmt = pstmt.getConnection().createStatement(); int n = stmt.executeUpdate (sql); - log.info("Executed SQL Statement for PostgreSQL: "+ getStringValue(element,"statement") + " ReturnValue="+n); + if (log.isLoggable(Level.INFO)) log.info("Executed SQL Statement for PostgreSQL: "+ getStringValue(element,"statement") + " ReturnValue="+n); } finally { DB.close(stmt); stmt = null; diff --git a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowElementHandler.java b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowElementHandler.java index 39a2dbec01..a76e55c03d 100644 --- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowElementHandler.java +++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/WorkflowElementHandler.java @@ -20,6 +20,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -202,8 +203,8 @@ public class WorkflowElementHandler extends AbstractElementHandler { psNCondition = DB.prepareStatement(sql, getTrxName(ctx)); nodeNConditionrs = psNCondition.executeQuery(); while (nodeNConditionrs.next()) { - ad_wf_nodenextcondition_id= nodeNConditionrs.getInt("AD_WF_NextCondition_ID"); - log.info("ad_wf_nodenextcondition_id: "+ String.valueOf(ad_wf_nodenextcondition_id)); + ad_wf_nodenextcondition_id= nodeNConditionrs.getInt("AD_WF_NextCondition_ID"); + if (log.isLoggable(Level.INFO)) log.info("ad_wf_nodenextcondition_id: "+ String.valueOf(ad_wf_nodenextcondition_id)); createNodeNextCondition(ctx, document, ad_wf_nodenextcondition_id); } } diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackIn.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackIn.java index 5c2d85d233..bb210d8674 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackIn.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackIn.java @@ -116,11 +116,11 @@ public class PackIn extends SvrProcess { * @return status message */ public String importXML(String fileName, Properties ctx, String trxName) throws Exception { - log.info("importXML:" + fileName); + if (log.isLoggable(Level.INFO)) log.info("importXML:" + fileName); File in = new File(fileName); if (!in.exists()) { String msg = "File does not exist: " + fileName; - log.info("importXML:" + msg); + if (log.isLoggable(Level.INFO)) log.info("importXML:" + msg); return msg; } try { @@ -177,14 +177,14 @@ public class PackIn extends SvrProcess { // Unzip package File zipFilepath = new File(adPackageImp.getAD_Package_Source()); - log.info("zipFilepath->" + zipFilepath); + if (log.isLoggable(Level.INFO)) log.info("zipFilepath->" + zipFilepath); String PackageName = CreateZipFile.getParentDir(zipFilepath); CreateZipFile.unpackFile(zipFilepath, targetDir); String dict_file = packageDirectory + File.separator + "packages" + File.separator + PackageName + File.separator + "dict" + File.separator + "PackOut.xml"; - log.info("dict file->" + dict_file); + if (log.isLoggable(Level.INFO)) log.info("dict file->" + dict_file); PackIn packIn = new PackIn(); if (adPackageImp.isAD_Override_Dict() == true) diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackInHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackInHandler.java index 719fdab425..495b3696b8 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackInHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackInHandler.java @@ -159,7 +159,7 @@ public class PackInHandler extends DefaultHandler { logDate = formatter_log.format(today); String file_document = packageDirectory+File.separator+"doc"+File.separator+"Importlog_"+fileDate+".xml"; - log.info("file_document="+file_document); + if (log.isLoggable(Level.INFO)) log.info("file_document="+file_document); try { fw_document = new FileOutputStream (file_document, false); } catch (FileNotFoundException e1) { @@ -171,7 +171,7 @@ public class PackInHandler extends DefaultHandler { try { logDocument = tf_document.newTransformerHandler(); } catch (TransformerConfigurationException e2) { - log.info ("startElement:"+e2); + if (log.isLoggable(Level.INFO)) log.info ("startElement:"+e2); } serializer_document = logDocument.getTransformer(); serializer_document.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1"); @@ -271,7 +271,7 @@ public class PackInHandler extends DefaultHandler { // adempiereAD. if (elementValue.equals("adempiereAD")) { - log.info("adempiereAD updateMode="+m_UpdateMode); + if (log.isLoggable(Level.INFO)) log.info("adempiereAD updateMode="+m_UpdateMode); //Start package log AttributesImpl attsOut = new AttributesImpl(); logDocument.startElement("","","adempiereDocument",attsOut); @@ -489,7 +489,7 @@ public class PackInHandler extends DefaultHandler { pstmt = null; } catch (Exception e) { - log.info ("createImp_Sum_table:"+e); + if (log.isLoggable(Level.INFO)) log.info ("createImp_Sum_table:"+e); } } if (tablename.equals("AD_Package_Imp_Inst")){ @@ -526,7 +526,7 @@ public class PackInHandler extends DefaultHandler { pstmt = null; } catch (Exception e) { - log.info ("createImp_Sum_table:"+e); + if (log.isLoggable(Level.INFO)) log.info ("createImp_Sum_table:"+e); } } if (tablename.equals("AD_Package_Imp_Detail")){ @@ -560,7 +560,7 @@ public class PackInHandler extends DefaultHandler { pstmt = null; } catch (Exception e) { - log.info ("createImp_Sum_table:"+e); + if (log.isLoggable(Level.INFO)) log.info ("createImp_Sum_table:"+e); } } if (tablename.equals("AD_Package_Imp_Backup")){ @@ -593,7 +593,7 @@ public class PackInHandler extends DefaultHandler { pstmt = null; } catch (Exception e) { - log.info ("createImp_Sum_table:"+e); + if (log.isLoggable(Level.INFO)) log.info ("createImp_Sum_table:"+e); } } } @@ -602,7 +602,7 @@ public class PackInHandler extends DefaultHandler { } catch (SQLException e) { - log.info ("createImp_Sum_table:"+e); + if (log.isLoggable(Level.INFO)) log.info ("createImp_Sum_table:"+e); } finally diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java index a1b7b326e4..c0277e716e 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackOut.java @@ -154,7 +154,7 @@ public class PackOut extends SvrProcess OutputStream packageDocStream = null; OutputStream packOutDocStream = null; - log.info("doIt - AD_PACKAGE_EXP_ID=" + p_PackOut_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - AD_PACKAGE_EXP_ID=" + p_PackOut_ID); if (p_PackOut_ID == 0) throw new IllegalArgumentException("No Record"); String sql1 = "SELECT * FROM AD_Package_Exp WHERE AD_Package_Exp_ID = "+p_PackOut_ID; @@ -284,7 +284,7 @@ public class PackOut extends SvrProcess final int AD_EntityType_ID = rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_EntityType_ID); Env.setContext(getCtx(), X_AD_Package_Exp_Detail.COLUMNNAME_AD_EntityType_ID, AD_EntityType_ID); // - log.info(rs.getString(X_AD_Package_Exp_Detail.COLUMNNAME_Line)); + if (log.isLoggable(Level.INFO)) log.info(rs.getString(X_AD_Package_Exp_Detail.COLUMNNAME_Line)); if (Type.compareTo("M") == 0){ createMenu(rs.getInt(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Menu_ID), packOutDocument ); } diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java index 4ed8ff5093..06a21d9fb0 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/PackRoll.java @@ -106,7 +106,7 @@ public class PackRoll extends SvrProcess { sql = new StringBuffer("SELECT * " + "FROM AD_Package_Imp_Detail " + "WHERE AD_Package_Imp_ID=" + m_AD_Package_Imp_ID + " ORDER BY AD_Package_Imp_Detail_ID DESC"); - log.info(sql.toString()); + if (log.isLoggable(Level.INFO)) log.info(sql.toString()); PreparedStatement pstmt = null; try { pstmt = DB.prepareStatement(sql.toString(), null); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/AdElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/AdElementHandler.java index eb85903d6f..c275d01b6e 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/AdElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/AdElementHandler.java @@ -19,6 +19,7 @@ package org.adempiere.pipo.handler; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -48,7 +49,7 @@ public class AdElementHandler extends AbstractElementHandler { String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("ColumnName")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("ColumnName")); String entitytype = atts.getValue("EntityType"); String ColumnName = atts.getValue("ColumnName"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CodeSnipitElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CodeSnipitElementHandler.java index f02183f271..b193450f8c 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CodeSnipitElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CodeSnipitElementHandler.java @@ -28,6 +28,7 @@ import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -102,7 +103,7 @@ public class CodeSnipitElementHandler extends AbstractElementHandler { targetDirectoryModified = fullDirectory.replace(slash2,slash1); File file = new File(targetDirectoryModified+sourceName); - log.info(targetDirectoryModified+sourceName); + if (log.isLoggable(Level.INFO)) log.info(targetDirectoryModified+sourceName); //TODO: derived force from user parameter boolean force = true; // check to see if overwrites are allowed @@ -114,15 +115,15 @@ public class CodeSnipitElementHandler extends AbstractElementHandler { //backup file to package directory else if (file.exists() && force == true) { Object_Status = "Update"; - log.info("Target Backup:"+targetDirectoryModified+sourceName); + if (log.isLoggable(Level.INFO)) log.info("Target Backup:"+targetDirectoryModified+sourceName); source = OpenInputfile(targetDirectoryModified+sourceName); SimpleDateFormat formatter_file = new SimpleDateFormat("yyMMddHHmmssSSSSZ"); Date today = new Date(); fileDate = formatter_file.format(today); copy = OpenOutputfile(packagePath+File.separator+"backup"+File.separator+fileDate+"_"+sourceName); - log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+sourceName); + if (log.isLoggable(Level.INFO)) log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+sourceName); copyFile (source,copy); - log.info("Backup Complete"); + if (log.isLoggable(Level.INFO)) log.info("Backup Complete"); } int success = readReplace(targetDirectoryModified+sourceName, oldCode, newCode); @@ -133,14 +134,14 @@ public class CodeSnipitElementHandler extends AbstractElementHandler { try { idDetail = record_log (ctx, 1, sourceName,"codesnipit", 0,0, Object_Status,sourceName,0); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } else{ try { idDetail = record_log (ctx, 0, sourceName,"codesnipit", 0,0, Object_Status,sourceName,0); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } //Record in transaction file diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ColumnElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ColumnElementHandler.java index 6881974feb..eb2acf5770 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ColumnElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ColumnElementHandler.java @@ -52,7 +52,7 @@ public class ColumnElementHandler extends AbstractElementHandler { PackIn packIn = (PackIn)ctx.get("PackInProcess"); String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("ColumnName")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("ColumnName")); int success = 0; String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java index 689fcc55a9..372ce9c076 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/CommonTranslationHandler.java @@ -6,6 +6,7 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -56,7 +57,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements String parentTable = atts.getValue(SPECIAL_ATRRIBUTE__TABLE_NAME); String language = atts.getValue("AD_Language"); - log.info(elementValue+" "+parentTable+" "+atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+parentTable+" "+atts.getValue("Name")); if(isRecordExists(parentTable, parentID, language, ctx)){ diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DataElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DataElementHandler.java index a677ecea92..150cbffff3 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DataElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DataElementHandler.java @@ -70,11 +70,11 @@ public class DataElementHandler extends AbstractElementHandler { if (atts.getValue("clientname") != null) { int AD_Client_ID = IDFinder.get_ID("AD_Client", atts.getValue("clientname"), getClientId(ctx), getTrxName(ctx)); Env.setContext(ctx, "AD_Client_ID", AD_Client_ID); - log.info("adempieredata: client set to "+AD_Client_ID+" "+atts.getValue("clientname")); + if (log.isLoggable(Level.INFO)) log.info("adempieredata: client set to "+AD_Client_ID+" "+atts.getValue("clientname")); } } else if (elementValue.equals("dtable")) { - log.info(elementValue+" "+atts.getValue("name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("name")); d_tablename = atts.getValue("name"); } // row element, adempieredata @@ -99,7 +99,7 @@ public class DataElementHandler extends AbstractElementHandler { public void startElement(Properties ctx, Element element) throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("name")); MTable table = MTable.get(ctx, d_tablename); String d_rowname = atts.getValue("name"); @@ -195,7 +195,7 @@ public class DataElementHandler extends AbstractElementHandler { genericPO.set_ValueOfColumn("AD_Client_ID", getClientId(ctx)); // if new. TODO: no defaults for keyXname. if (d_rowname != null && !d_rowname.equals("") && ((Integer)(genericPO.get_Value(d_tablename+"_ID"))).intValue() == 0) { - log.info("new genericPO, table: "+d_tablename+" name:"+d_rowname); + if (log.isLoggable(Level.INFO)) log.info("new genericPO, table: "+d_tablename+" name:"+d_rowname); genericPO.set_ValueOfColumn("Name", d_rowname); // Set defaults. //TODO: get defaults from configuration @@ -241,7 +241,7 @@ public class DataElementHandler extends AbstractElementHandler { public void startElement(Properties ctx, Element element) throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("name")); String columnName = atts.getValue("name"); int tableid = get_IDWithColumn(ctx, "AD_Table", "TableName", d_tablename); int id =get_IDWithMasterAndColumn (ctx,"AD_Column", "ColumnName", columnName, "AD_Table", tableid); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DistFileElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DistFileElementHandler.java index 26fbe8eeab..e988db3817 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DistFileElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DistFileElementHandler.java @@ -23,6 +23,7 @@ import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -44,7 +45,7 @@ public class DistFileElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("name")); String releaseNumber = atts.getValue("ReleaseNo"); //log.info(atts.getValue("ReleaseNo")); @@ -108,13 +109,13 @@ public class DistFileElementHandler extends AbstractElementHandler { //backup file to package directory else if (file.exists() && force == true) { Object_Status = "Update"; - log.info("Target Backup:"+fullTargetPath+fileName); + if (log.isLoggable(Level.INFO)) log.info("Target Backup:"+fullTargetPath+fileName); inputStream = OpenInputfile(fullTargetPath+fileName); SimpleDateFormat formatter_file = new SimpleDateFormat("yyMMddHHmmssSSSSZ"); Date today = new Date(); fileDate = formatter_file.format(today); outputStream = OpenOutputfile(packagePath+File.separator+"backup"+File.separator+fileDate+"_"+fileName); - log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+fileName); + if (log.isLoggable(Level.INFO)) log.info("Source Backup:"+packagePath+File.separator+"backup"+File.separator+fileDate+"_"+fileName); copyFile (inputStream, outputStream); log.info("Backup Complete"); } @@ -144,14 +145,14 @@ public class DistFileElementHandler extends AbstractElementHandler { try { idDetail = record_log (ctx, 1, fileName,"file", 0,0, Object_Status,fileName,0); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } else{ try { idDetail = record_log (ctx, 0, fileName,"file", 0,0, Object_Status,fileName,0); } catch (SAXException e) { - log.info ("setfile:"+e); + if (log.isLoggable(Level.INFO)) log.info ("setfile:"+e); } } //Record in transaction file diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DynValRuleElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DynValRuleElementHandler.java index cce1e6d84e..7d3bcef1e4 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DynValRuleElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/DynValRuleElementHandler.java @@ -44,7 +44,7 @@ public class DynValRuleElementHandler extends AbstractElementHandler { public void startElement(Properties ctx, Element element) throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("Name")); String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { String name = atts.getValue("Name"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/EntityTypeElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/EntityTypeElementHandler.java index 2408ab4cc9..e23808dae7 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/EntityTypeElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/EntityTypeElementHandler.java @@ -6,6 +6,7 @@ package org.adempiere.pipo.handler; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -38,7 +39,7 @@ public class EntityTypeElementHandler extends AbstractElementHandler final String elementValue = element.getElementValue(); final Attributes atts = element.attributes; final String entitytype = atts.getValue(I_AD_EntityType.COLUMNNAME_EntityType); - log.info(elementValue+" "+entitytype); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+entitytype); if (isProcessElement(ctx, entitytype)) { int id = get_IDWithColumn(ctx, I_AD_EntityType.Table_Name, I_AD_EntityType.COLUMNNAME_EntityType, entitytype); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldElementHandler.java index ca4b050f54..54cacacba1 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldElementHandler.java @@ -19,6 +19,7 @@ package org.adempiere.pipo.handler; import java.math.BigDecimal; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -53,7 +54,7 @@ public class FieldElementHandler extends AbstractElementHandler PackIn packIn = (PackIn)ctx.get("PackInProcess"); String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { if (element.parent != null && element.parent.getElementValue().equals("tab") && diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldGroupElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldGroupElementHandler.java index fab505e117..bf1852891a 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldGroupElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FieldGroupElementHandler.java @@ -20,6 +20,7 @@ package org.adempiere.pipo.handler; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -47,7 +48,7 @@ public class FieldGroupElementHandler extends AbstractElementHandler { String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); String entitytype = atts.getValue("EntityType"); String name = atts.getValue("Name"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FormElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FormElementHandler.java index 666e66bd9e..4ed5ac30b6 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FormElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/FormElementHandler.java @@ -19,6 +19,7 @@ package org.adempiere.pipo.handler; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -41,7 +42,7 @@ public class FormElementHandler extends AbstractElementHandler { public void startElement(Properties ctx, Element element) throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("ADFormNameID")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("ADFormNameID")); String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatElementHandler.java index 86733c43ec..cef3cabf32 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatElementHandler.java @@ -52,7 +52,7 @@ public class ImpFormatElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); int id = get_ID(ctx, "AD_ImpFormat", atts.getValue("Name")); X_AD_ImpFormat m_ImpFormat = new X_AD_ImpFormat(ctx, id, diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatRowElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatRowElementHandler.java index f8e2010398..76a79cf73e 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatRowElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ImpFormatRowElementHandler.java @@ -17,6 +17,7 @@ package org.adempiere.pipo.handler; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -38,7 +39,7 @@ public class ImpFormatRowElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("Name")); int impformid = get_ID(ctx, "AD_ImpFormat", atts.getValue("ADImpFormatNameID")); if (impformid <= 0) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java index 75b594cac4..a3e7ec4feb 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MenuElementHandler.java @@ -45,7 +45,7 @@ public class MenuElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("ADMenuNameID")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("ADMenuNameID")); // String entitytype = atts.getValue("EntityType"); // if (entitytype.compareTo("U") == 0 || entitytype.compareTo("D") == 0 // && m_UpdateMode == true ) { @@ -149,7 +149,7 @@ public class MenuElementHandler extends AbstractElementHandler { get_IDWithColumn(ctx, "AD_Table", "TableName", "AD_Menu")); } catch (SAXException e) { - log.info("setmenu:" + e); + if (log.isLoggable(Level.INFO)) log.info("setmenu:" + e); } } else { try { @@ -158,7 +158,7 @@ public class MenuElementHandler extends AbstractElementHandler { get_IDWithColumn(ctx, "AD_Table", "TableName", "AD_Menu")); } catch (SAXException e) { - log.info("setmenu:" + e); + if (log.isLoggable(Level.INFO)) log.info("setmenu:" + e); } } name = atts.getValue("ADParentMenuNameID"); @@ -246,7 +246,7 @@ public class MenuElementHandler extends AbstractElementHandler { pstmt1 = null; } catch (Exception e) { - log.info("get_IDWithMasterID:" + e); + if (log.isLoggable(Level.INFO)) log.info("get_IDWithMasterID:" + e); } sqlB = new StringBuffer("UPDATE AD_TREENODEMM ").append( diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MessageElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MessageElementHandler.java index af888556ef..cca795777a 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MessageElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/MessageElementHandler.java @@ -20,6 +20,7 @@ package org.adempiere.pipo.handler; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -43,7 +44,7 @@ public class MessageElementHandler extends AbstractElementHandler { public void startElement(Properties ctx, Element element) throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("Value")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("Value")); String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { String value = atts.getValue("Value"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ModelValidatorElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ModelValidatorElementHandler.java index f92cedf8e4..befe54a646 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ModelValidatorElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ModelValidatorElementHandler.java @@ -18,6 +18,7 @@ package org.adempiere.pipo.handler; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -49,7 +50,7 @@ public class ModelValidatorElementHandler extends AbstractElementHandler { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue(I_AD_ModelValidator.COLUMNNAME_Name)); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue(I_AD_ModelValidator.COLUMNNAME_Name)); String entitytype = atts.getValue(I_AD_ModelValidator.COLUMNNAME_EntityType); if (isProcessElement(ctx, entitytype)) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java index 6d33bb93cc..8a3a87a167 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java @@ -54,7 +54,7 @@ public class PrintFormatElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); String name = atts.getValue("Name"); int id = get_IDWithColumn(ctx, "AD_PrintFormat", "Name", name); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatItemElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatItemElementHandler.java index 2a46dd91b3..25d6cf7c60 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatItemElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintFormatItemElementHandler.java @@ -18,6 +18,7 @@ package org.adempiere.pipo.handler; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -40,7 +41,7 @@ public class PrintFormatItemElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); if (element.parent != null && element.parent.getElementValue().equals("printformat") && element.parent.defer) { element.defer = true; diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintPaperElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintPaperElementHandler.java index 27c9e447cd..290817798f 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintPaperElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/PrintPaperElementHandler.java @@ -8,6 +8,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -102,7 +103,7 @@ public class PrintPaperElementHandler extends AbstractElementHandler final int id = get_IDWithColumn(ctx, getTableName(), getIdentifierColumnName(), strIdentifier); final PO po = getCreatePO(ctx, id, getTrxName(ctx)); final String keyColumnName = getKeyColumnName(); - log.info(elementValue+" "+strIdentifier+"["+id+"]"); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+strIdentifier+"["+id+"]"); if (id <= 0 && keyColumnName != null && getIntValue(atts, keyColumnName, 0) <= PackOut.MAX_OFFICIAL_ID) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ProcessElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ProcessElementHandler.java index 43d3a3c579..6469aaca77 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ProcessElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ProcessElementHandler.java @@ -49,7 +49,7 @@ public class ProcessElementHandler extends AbstractElementHandler { throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); int id = 0; String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceElementHandler.java index f41a8153d8..d26ee25670 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceElementHandler.java @@ -54,7 +54,7 @@ public class ReferenceElementHandler extends AbstractElementHandler { String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("name")); String entitytype = atts.getValue("EntityType"); String name = atts.getValue("name"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceListElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceListElementHandler.java index bc7ef2f6fb..40fc114b04 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceListElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReferenceListElementHandler.java @@ -17,6 +17,7 @@ package org.adempiere.pipo.handler; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -39,7 +40,7 @@ public class ReferenceListElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); // TODO: Solve for date issues with valuefrom valueto String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewColElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewColElementHandler.java index b9d31dbddc..3e2436b77d 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewColElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewColElementHandler.java @@ -17,6 +17,7 @@ package org.adempiere.pipo.handler; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -40,7 +41,7 @@ public class ReportViewColElementHandler extends AbstractElementHandler { String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("ADReportViewColID")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("ADReportViewColID")); String entitytype = atts.getValue("EntityType"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewElementHandler.java index b2b2212920..d586c99a8b 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/ReportViewElementHandler.java @@ -53,7 +53,7 @@ public class ReportViewElementHandler extends AbstractElementHandler { int AD_Backup_ID = -1; String Object_Status = null; Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("ADReportviewnameID")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("ADReportviewnameID")); //String entitytype = atts.getValue("EntityType"); String name = atts.getValue("ADReportviewnameID"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/RoleElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/RoleElementHandler.java index c992ba168b..b49382b7c3 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/RoleElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/RoleElementHandler.java @@ -62,7 +62,7 @@ public class RoleElementHandler extends AbstractElementHandler { throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); String name = atts.getValue("Name"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/SQLStatementElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/SQLStatementElementHandler.java index ce323e9584..f9e8688113 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/SQLStatementElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/SQLStatementElementHandler.java @@ -53,11 +53,11 @@ public class SQLStatementElementHandler extends AbstractElementHandler { if(DBType.equals("ALL")) { @SuppressWarnings("unused") int n = pstmt.executeUpdate(); - log.info("Executed SQL Statement: "+ atts.getValue("statement")); + if (log.isLoggable(Level.INFO)) log.info("Executed SQL Statement: "+ atts.getValue("statement")); } else if(DB.isOracle() == true && DBType.equals("Oracle")) { pstmt.executeUpdate(); - log.info("Executed SQL Statement for Oracle: "+ atts.getValue("statement")); + if (log.isLoggable(Level.INFO)) log.info("Executed SQL Statement for Oracle: "+ atts.getValue("statement")); } else if ( DB.isPostgreSQL() && ( DBType.equals("Postgres") @@ -74,7 +74,7 @@ public class SQLStatementElementHandler extends AbstractElementHandler { Statement stmt = m_con.createStatement(); @SuppressWarnings("unused") int n = stmt.executeUpdate (atts.getValue("statement")); - log.info("Executed SQL Statement for PostgreSQL: "+ atts.getValue("statement")); + if (log.isLoggable(Level.INFO)) log.info("Executed SQL Statement for PostgreSQL: "+ atts.getValue("statement")); // Postgres needs to commit DDL statements if (m_con != null && !m_con.getAutoCommit()) m_con.commit(); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TabElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TabElementHandler.java index fab0a82f43..6e008c4be8 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TabElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TabElementHandler.java @@ -46,7 +46,7 @@ public class TabElementHandler extends AbstractElementHandler public void startElement(Properties ctx, Element element) throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("ADTabNameID")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("ADTabNameID")); String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { if (element.parent != null && element.parent.getElementValue().equals("window") diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TableElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TableElementHandler.java index fbe7f4b9ba..d2b92bda5f 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TableElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TableElementHandler.java @@ -52,7 +52,7 @@ public class TableElementHandler extends AbstractElementHandler { final PackIn packIn = (PackIn)ctx.get("PackInProcess"); final String elementValue = element.getElementValue(); final Attributes atts = element.attributes; - log.info(elementValue+" "+atts.getValue("ADTableNameID")); + if (log.isLoggable(Level.INFO)) log.info(elementValue+" "+atts.getValue("ADTableNameID")); final String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TaskElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TaskElementHandler.java index 44373e00c0..2cc739e25c 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TaskElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/TaskElementHandler.java @@ -19,6 +19,7 @@ package org.adempiere.pipo.handler; import java.util.ArrayList; import java.util.List; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -42,7 +43,7 @@ public class TaskElementHandler extends AbstractElementHandler { throws SAXException { String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("ADTaskNameID")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("ADTaskNameID")); String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { String name = atts.getValue("ADTaskNameID"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WindowElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WindowElementHandler.java index fff1a5855e..030b891a59 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WindowElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WindowElementHandler.java @@ -54,7 +54,7 @@ public class WindowElementHandler extends AbstractElementHandler { // Check namespace. String elementValue = element.getElementValue(); Attributes atts = element.attributes; - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); String entitytype = atts.getValue("EntityType"); if (isProcessElement(ctx, entitytype)) { String name = atts.getValue("Name"); diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowElementHandler.java index f3ba720c12..0a7c069aae 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowElementHandler.java @@ -57,9 +57,9 @@ public class WorkflowElementHandler extends AbstractElementHandler { throws SAXException { Attributes atts = element.attributes; String elementValue = element.getElementValue(); - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); String entitytype = atts.getValue("EntityType"); - log.info("entitytype " + atts.getValue("EntityType")); + if (log.isLoggable(Level.INFO)) log.info("entitytype " + atts.getValue("EntityType")); if (isProcessElement(ctx, entitytype)) { @@ -281,7 +281,7 @@ public class WorkflowElementHandler extends AbstractElementHandler { rsnnc = pstmtnnc.executeQuery(); while (rsnnc.next()) { ad_wf_nodenextcondition_id = rsnnc.getInt("AD_WF_NextCondition_ID"); - log.info("ad_wf_nodenextcondition_id: " + String.valueOf(ad_wf_nodenextcondition_id)); + if (log.isLoggable(Level.INFO)) log.info("ad_wf_nodenextcondition_id: " + String.valueOf(ad_wf_nodenextcondition_id)); if (ad_wf_nodenextcondition_id > 0) { createNodeNextCondition(ctx, document, ad_wf_nodenextcondition_id); } diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeElementHandler.java index 5d596d5a06..01e1533698 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeElementHandler.java @@ -19,6 +19,7 @@ package org.adempiere.pipo.handler; import java.math.BigDecimal; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -39,9 +40,9 @@ public class WorkflowNodeElementHandler extends AbstractElementHandler { throws SAXException { Attributes atts = element.attributes; String elementValue = element.getElementValue(); - log.info(elementValue + " " + atts.getValue("Name")); + if (log.isLoggable(Level.INFO)) log.info(elementValue + " " + atts.getValue("Name")); String entitytype = atts.getValue("EntityType"); - log.info("entitytype " + atts.getValue("EntityType")); + if (log.isLoggable(Level.INFO)) log.info("entitytype " + atts.getValue("EntityType")); if (isProcessElement(ctx, entitytype)) { if (element.parent != null && element.parent.skip) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextConditionElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextConditionElementHandler.java index 31804ba0fa..8a3b6c1f4d 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextConditionElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextConditionElementHandler.java @@ -17,6 +17,7 @@ package org.adempiere.pipo.handler; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -39,7 +40,7 @@ public class WorkflowNodeNextConditionElementHandler extends throws SAXException { Attributes atts = element.attributes; String entitytype = atts.getValue("EntityType"); - log.info("entitytype " + atts.getValue("EntityType")); + if (log.isLoggable(Level.INFO)) log.info("entitytype " + atts.getValue("EntityType")); if (isProcessElement(ctx, entitytype)) { if (element.parent != null && element.parent.skip) { diff --git a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextElementHandler.java b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextElementHandler.java index 72999feb49..1c74250845 100644 --- a/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextElementHandler.java +++ b/org.adempiere.pipo.legacy/src/org/adempiere/pipo/handler/WorkflowNodeNextElementHandler.java @@ -17,6 +17,7 @@ package org.adempiere.pipo.handler; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.sax.TransformerHandler; @@ -37,7 +38,7 @@ public class WorkflowNodeNextElementHandler extends AbstractElementHandler { public void startElement(Properties ctx, Element element) throws SAXException { Attributes atts = element.attributes; String entitytype = atts.getValue("EntityType"); - log.info("entitytype "+atts.getValue("EntityType")); + if (log.isLoggable(Level.INFO)) log.info("entitytype "+atts.getValue("EntityType")); if (isProcessElement(ctx, entitytype)) { if (element.parent != null && element.parent.skip) { diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java b/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java index 9cdfc4b7ea..604b59ec83 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/IDFinder.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.logging.Level; import org.adempiere.pipo2.exception.DatabaseAccessException; import org.apache.commons.codec.DecoderException; @@ -292,7 +293,7 @@ public class IDFinder { sqlB.append(tableNameMaster+"_ID = ? AND AD_Client_ID IN (0, ?) ") .append("ORDER BY AD_Client_ID Desc "); - log.info(sqlB.toString()); + if (log.isLoggable(Level.INFO)) log.info(sqlB.toString()); PreparedStatement pstmt = null; ResultSet rs = null; diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackIn.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackIn.java index 5ae72bf39c..54c50a8939 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackIn.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackIn.java @@ -114,11 +114,11 @@ public class PackIn { * @return status message */ public String importXML(String fileName, Properties ctx, String trxName) throws Exception { - log.info("importXML:" + fileName); + if (log.isLoggable(Level.INFO)) log.info("importXML:" + fileName); File in = new File(fileName); if (!in.exists()) { String msg = "File does not exist: " + fileName; - log.info("importXML:" + msg); + if (log.isLoggable(Level.INFO)) log.info("importXML:" + msg); return msg; } try { diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java index 772a63ccab..71253137ad 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java @@ -109,7 +109,7 @@ public class PackInHandler extends DefaultHandler { // idempiere if (qName.equals("idempiere")) { - log.info("idempiere updateMode="+m_updateDictionary); + if (log.isLoggable(Level.INFO)) log.info("idempiere updateMode="+m_updateDictionary); //check client String clientAttribute = atts.getValue("Client"); diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInProcess.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInProcess.java index 81b28a57d5..c0c07132d0 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInProcess.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInProcess.java @@ -19,6 +19,7 @@ package org.adempiere.pipo2; import java.io.File; import java.sql.Timestamp; +import java.util.logging.Level; import org.compiere.Adempiere; import org.compiere.model.MAttachment; @@ -103,7 +104,7 @@ public class PackInProcess extends SvrProcess { // Unzip package File zipFilepath = entry.getFile(); - log.info("zipFilepath->" + zipFilepath); + if (log.isLoggable(Level.INFO)) log.info("zipFilepath->" + zipFilepath); String parentDir = Zipper.getParentDir(zipFilepath); Zipper.unpackFile(zipFilepath, targetDir); @@ -111,7 +112,7 @@ public class PackInProcess extends SvrProcess { + "packin" + File.separator + parentDir + File.separator + "dict" + File.separator + "PackOut.xml"; - log.info("dict file->" + dict_file); + if (log.isLoggable(Level.INFO)) log.info("dict file->" + dict_file); if (adPackageImp.isAD_Override_Dict() == true) m_UpdateDictionary = true; diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java index 6a54799dd7..9642908f9f 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackOutProcess.java @@ -84,7 +84,7 @@ public class PackOutProcess extends SvrProcess protected String doIt() throws java.lang.Exception { - log.info("doIt - AD_PACKAGE_EXP_ID=" + p_PackOut_ID); + if (log.isLoggable(Level.INFO)) log.info("doIt - AD_PACKAGE_EXP_ID=" + p_PackOut_ID); if (p_PackOut_ID == 0) throw new IllegalArgumentException("No Record"); @@ -122,7 +122,7 @@ public class PackOutProcess extends SvrProcess .list(); for(MPackageExpDetail dtl : packageExpDetails){ String type = getTypeName(dtl.getType()); - log.info(Integer.toString(dtl.getLine())); + if (log.isLoggable(Level.INFO)) log.info(Integer.toString(dtl.getLine())); PackoutItem item = new PackoutItem(type, dtl.getExpRecordId(), getExpProperties(dtl)); packoutItems.add(item); } diff --git a/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/FileImportProcessor.java b/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/FileImportProcessor.java index ca9b5bfdf8..0d2fe65b00 100644 --- a/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/FileImportProcessor.java +++ b/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/FileImportProcessor.java @@ -29,6 +29,7 @@ package org.adempiere.server.rpl.imp; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.process.rpl.imp.ImportHelper; import org.adempiere.process.rpl.XMLHelper; @@ -60,8 +61,10 @@ public class FileImportProcessor implements IImportProcessor { String folder = ""; if (processorParameters != null && processorParameters.length > 0) { for (int i = 0; i < processorParameters.length; i++) { - log.info("ProcesParameter Value = " + processorParameters[i].getValue()); - log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + if (log.isLoggable(Level.INFO)) { + log.info("ProcesParameter Value = " + processorParameters[i].getValue()); + log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + } if (processorParameters[i].getValue().equals("fileName")) { fileName = processorParameters[i].getParameterValue(); } else if ( processorParameters[i].getValue().equals("folder") ) { diff --git a/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicImportProcessor.java b/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicImportProcessor.java index df68dfe2b8..aebbbdf6b0 100644 --- a/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicImportProcessor.java +++ b/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicImportProcessor.java @@ -29,6 +29,7 @@ package org.adempiere.server.rpl.imp; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.server.rpl.IImportProcessor; import org.compiere.model.MIMPProcessor; @@ -56,8 +57,10 @@ public class TopicImportProcessor implements IImportProcessor { public void process(Properties ctx, ReplicationProcessor replicationProcessor, String trxName) throws Exception { - log.info("replicationProcessor = " + replicationProcessor); - log.info("replicationProcessor.getMImportProcessor() = " + replicationProcessor.getMImportProcessor()); + if (log.isLoggable(Level.INFO)) { + log.info("replicationProcessor = " + replicationProcessor); + log.info("replicationProcessor.getMImportProcessor() = " + replicationProcessor.getMImportProcessor()); + } MIMPProcessor impProcessor = replicationProcessor.getMImportProcessor(); @@ -78,8 +81,10 @@ public class TopicImportProcessor implements IImportProcessor { if (processorParameters != null && processorParameters.length > 0) { for (int i = 0; i < processorParameters.length; i++) { - log.info("ProcesParameter Value = " + processorParameters[i].getValue()); - log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + if (log.isLoggable(Level.INFO)) { + log.info("ProcesParameter Value = " + processorParameters[i].getValue()); + log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + } if (processorParameters[i].getValue().equals("topicName")) { topicName = processorParameters[i].getParameterValue(); } else if (processorParameters[i].getValue().equals("protocol")) { @@ -114,7 +119,7 @@ public class TopicImportProcessor implements IImportProcessor { , account, password, options, trxName); topicListener.run(); - log.info("Started topicListener = " + topicListener); + if (log.isLoggable(Level.INFO)) log.info("Started topicListener = " + topicListener); } public void stop() throws Exception { diff --git a/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicListener.java b/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicListener.java index 35a5fee86c..91b4b3b016 100644 --- a/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicListener.java +++ b/org.adempiere.replication.server/src/org/adempiere/server/rpl/imp/TopicListener.java @@ -225,7 +225,7 @@ public class TopicListener implements MessageListener { } catch (Exception e) { - log.info("Error while invoking setClientID(" + clientID +")! " + e.getMessage()); + if (log.isLoggable(Level.INFO)) log.info("Error while invoking setClientID(" + clientID +")! " + e.getMessage()); conn.close(); return; } diff --git a/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java b/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java index 868e1bc241..91ce39ab66 100644 --- a/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java +++ b/org.adempiere.replication/src/org/adempiere/model/ExportModelValidator.java @@ -29,6 +29,8 @@ package org.adempiere.model; +import java.util.logging.Level; + import org.adempiere.process.rpl.exp.ExportHelper; import org.compiere.model.MClient; import org.compiere.model.MOrg; @@ -108,7 +110,7 @@ public class ExportModelValidator implements ModelValidator if (client != null) { m_AD_Client_ID = client.getAD_Client_ID(); - log.info(client.toString()); + if (log.isLoggable(Level.INFO)) log.info(client.toString()); } else { @@ -128,7 +130,7 @@ public class ExportModelValidator implements ModelValidator public String modelChange (PO po, int type) throws Exception { //String Mode = "Table"; - log.info("po.get_TableName() = " + po.get_TableName()); + if (log.isLoggable(Level.INFO)) log.info("po.get_TableName() = " + po.get_TableName()); if (expHelper != null) { if ( type == TYPE_AFTER_CHANGE || type == TYPE_AFTER_NEW @@ -161,7 +163,7 @@ public class ExportModelValidator implements ModelValidator */ public String docValidate (PO po, int type) { - log.info("Replicate the Document = " + po.get_TableName() + " with Type = " + type); + if (log.isLoggable(Level.INFO)) log.info("Replicate the Document = " + po.get_TableName() + " with Type = " + type); String result = null; if (expHelper != null) { try { @@ -219,9 +221,10 @@ public class ExportModelValidator implements ModelValidator m_AD_Role_ID = AD_Role_ID; m_AD_User_ID = AD_User_ID; - log.info("AD_Org_ID =" + m_AD_Org_ID); - log.info("AD_Role_ID =" + m_AD_Role_ID); - log.info("AD_User_ID =" + m_AD_User_ID); + if (log.isLoggable(Level.INFO)){ + log.info("AD_Org_ID =" + m_AD_Org_ID); + log.info("AD_Role_ID =" + m_AD_Role_ID); + log.info("AD_User_ID =" + m_AD_User_ID);} loadReplicationStrategy(); return null; } @@ -246,7 +249,7 @@ public class ExportModelValidator implements ModelValidator if(m_AD_ReplicationStrategy_ID <= 0) { m_AD_ReplicationStrategy_ID = client.getAD_ReplicationStrategy_ID(); - log.info("client.getAD_ReplicationStrategy_ID() = " + m_AD_ReplicationStrategy_ID); + if (log.isLoggable(Level.INFO)) log.info("client.getAD_ReplicationStrategy_ID() = " + m_AD_ReplicationStrategy_ID); } if (m_AD_ReplicationStrategy_ID > 0) { diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java index eb76cd6e52..f5f81c3c6f 100644 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ExportHelper.java @@ -108,17 +108,18 @@ public class ExportHelper { public String exportRecord (PO po, Integer ReplicationMode , String ReplicationType, Integer ReplicationEvent) throws Exception { MClient client = MClient.get (po.getCtx(), m_AD_Client_ID); - log.info("Client = " + client.toString()); + if (log.isLoggable(Level.INFO)) { + log.info("Client = " + client.toString()); + log.info("po.getAD_Org_ID() = " + po.getAD_Org_ID()); + log.info("po.get_TrxName() = " + po.get_TrxName()); + } - log.info("po.getAD_Org_ID() = " + po.getAD_Org_ID()); - - log.info("po.get_TrxName() = " + po.get_TrxName()); if (po.get_TrxName() == null || po.get_TrxName().equals("")) { po.set_TrxName("exportRecord"); } - log.info("Table = " + po.get_TableName()); + if (log.isLoggable(Level.INFO)) log.info("Table = " + po.get_TableName()); if (po.get_KeyColumns().length < 1) { throw new Exception(Msg.getMsg (po.getCtx(), "ExportNoneColumnKeyNotSupported"));//TODO: Create Mesagge. @@ -133,7 +134,7 @@ public class ExportHelper { if (exportFormat == null || exportFormat.getEXP_Format_ID() == 0) { // Fall back to System Client MClient systemClient = MClient.get (po.getCtx(), 0); - log.info(systemClient.toString()); + if (log.isLoggable(Level.INFO)) log.info(systemClient.toString()); exportFormat = MEXPFormat.getFormatByAD_Client_IDAD_Table_IDAndVersion(po.getCtx(), 0, po.get_Table_ID(), version, po.get_TrxName()); if (exportFormat == null || exportFormat.getEXP_Format_ID() == 0) { @@ -192,7 +193,7 @@ public class ExportHelper { { MClient client = MClient.get (exportFormat.getCtx(), m_AD_Client_ID); MTable table = MTable.get(exportFormat.getCtx(), exportFormat.getAD_Table_ID()); - log.info("Table = " + table); + if (log.isLoggable(Level.INFO)) log.info("Table = " + table); Collection records = new Query(exportFormat.getCtx(),table.getTableName(), exportFormat.getWhereClause(), exportFormat.get_TrxName()) .setOnlyActiveRecords(true) @@ -200,7 +201,7 @@ public class ExportHelper { for (PO po : records) { - log.info("Client = " + client.toString()); + if (log.isLoggable(Level.INFO)) log.info("Client = " + client.toString()); if (log.isLoggable(Level.FINEST)){ log.finest("po.getAD_Org_ID() = " + po.getAD_Org_ID()); log.finest("po.get_TrxName() = " + po.get_TrxName()); @@ -253,7 +254,7 @@ public class ExportHelper { // process single XML Attribute // Create new element Element newElement = outDocument.createElement(formatLine.getValue()); - log.info("Format Line Seach key: "+ formatLine.getValue()); + if (log.isLoggable(Level.INFO)) log.info("Format Line Seach key: "+ formatLine.getValue()); if (formatLine.getAD_Column_ID() == 0) { throw new Exception(Msg.getMsg (masterPO.getCtx(), "EXPColumnMandatory")); } @@ -300,7 +301,7 @@ public class ExportHelper { } } } - log.info("EXP Field - column=["+column.getColumnName()+"]; value=" + value); + if (log.isLoggable(Level.INFO)) log.info("EXP Field - column=["+column.getColumnName()+"]; value=" + value); if (valueString != null && !"".equals(valueString) && !"null".equals(valueString)) { Text newText = outDocument.createTextNode(valueString); newElement.appendChild(newText); @@ -360,7 +361,7 @@ public class ExportHelper { } } }*/ - log.info("EXP Field - column=["+column.getColumnName()+"]; value=" + value); + if (log.isLoggable(Level.INFO)) log.info("EXP Field - column=["+column.getColumnName()+"]; value=" + value); if (valueString != null && !"".equals(valueString) && !"null".equals(valueString)) { rootElement.setAttribute(formatLine.getValue(), valueString); elementHasValue = true; @@ -378,7 +379,7 @@ public class ExportHelper { MEXPFormat embeddedFormat = MEXPFormat.get(masterPO.getCtx(), embeddedFormat_ID, masterPO.get_TrxName()); MTable tableEmbedded = MTable.get(masterPO.getCtx(), embeddedFormat.getAD_Table_ID()); - log.info("Table Embedded = " + tableEmbedded); + if (log.isLoggable(Level.INFO)) log.info("Table Embedded = " + tableEmbedded); final StringBuilder whereClause = new StringBuilder(masterPO.get_KeyColumns()[0] +"=?"); @@ -414,7 +415,7 @@ public class ExportHelper { MEXPFormat embeddedFormat = MEXPFormat.get(masterPO.getCtx(), embeddedFormat_ID, masterPO.get_TrxName()); MTable tableEmbedded = MTable.get(masterPO.getCtx(), embeddedFormat.getAD_Table_ID()); - log.info("Table Embedded = " + tableEmbedded); + if (log.isLoggable(Level.INFO)) log.info("Table Embedded = " + tableEmbedded); final StringBuilder whereClause = new StringBuilder(tableEmbedded.getTableName() + "_ID =?"); if (embeddedFormat.getWhereClause() != null & !"".equals(embeddedFormat.getWhereClause())) diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/HDDExportProcessor.java b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/HDDExportProcessor.java index 8cad5e8159..3c49f41a38 100644 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/HDDExportProcessor.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/HDDExportProcessor.java @@ -32,6 +32,7 @@ import java.io.File; import java.io.StringWriter; import java.io.Writer; import java.util.Properties; +import java.util.logging.Level; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; @@ -75,8 +76,10 @@ public class HDDExportProcessor implements IExportProcessor { // One special parameter which will be used for remote folder name. // Or could add flag to ProcessorParameters table which will distinguish between // connection parameters and FTP Upload parameters. - log.info("ProcesParameter Value = " + processorParameters[i].getValue()); - log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + if (log.isLoggable(Level.INFO)) { + log.info("ProcesParameter Value = " + processorParameters[i].getValue()); + log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + } if ( processorParameters[i].getValue().equals("fileName") ) { fileName = processorParameters[i].getParameterValue(); } else if ( processorParameters[i].getValue().equals("folder") ) { diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ModelExporter.java b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ModelExporter.java index f3ec462b0b..2adcc39b48 100644 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ModelExporter.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/ModelExporter.java @@ -106,7 +106,7 @@ public class ModelExporter extends SvrProcess { + "ExportFile.xml"; p_FileName = fileNameOr; } - log.info(sb.toString()); + if (log.isLoggable(Level.INFO)) log.info(sb.toString()); } /** diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/TopicExportProcessor.java b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/TopicExportProcessor.java index d701ccd650..465fa7b5e3 100644 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/exp/TopicExportProcessor.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/exp/TopicExportProcessor.java @@ -32,6 +32,7 @@ package org.adempiere.process.rpl.exp; import java.io.StringWriter; import java.io.Writer; import java.util.Properties; +import java.util.logging.Level; import javax.jms.Connection; import javax.jms.DeliveryMode; @@ -91,8 +92,10 @@ public class TopicExportProcessor implements IExportProcessor { X_EXP_ProcessorParameter[] processorParameters = expProcessor.getEXP_ProcessorParameters(trx.getTrxName()); if (processorParameters != null && processorParameters.length > 0) { for (int i = 0; i < processorParameters.length; i++) { - log.info("ProcesParameter Value = " + processorParameters[i].getValue()); - log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + if (log.isLoggable(Level.INFO)) { + log.info("ProcesParameter Value = " + processorParameters[i].getValue()); + log.info("ProcesParameter ParameterValue = " + processorParameters[i].getParameterValue()); + } if (processorParameters[i].getValue().equals("topicName")) { topicName = processorParameters[i].getParameterValue(); } else if (processorParameters[i].getValue().equals("protocol")) { diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java b/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java index 3b9a3dfd45..b439a68ae5 100755 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ImportHelper.java @@ -115,14 +115,14 @@ public class ImportHelper { String AD_Client_Value = null; AD_Client_Value = rootElement.getAttribute("AD_Client_Value"); - log.info("AD_Client_Value = " + AD_Client_Value); + if (log.isLoggable(Level.INFO)) log.info("AD_Client_Value = " + AD_Client_Value); if (AD_Client_Value == null || Util.isEmpty(AD_Client_Value)) { throw new Exception(Msg.getMsg(ctx, "XMLClientValueMandatory")); } String version = null; version = rootElement.getAttribute("Version"); - log.info("Version = " + version); + if (log.isLoggable(Level.INFO)) log.info("Version = " + version); if (version == null || Util.isEmpty(version)) { throw new Exception(Msg.getMsg(ctx, "XMLVersionAttributeMandatory")); @@ -138,11 +138,11 @@ public class ImportHelper { { throw new Exception(Msg.getMsg(ctx, "XMLClientNotFound")); } - log.info(client.toString()); + if (log.isLoggable(Level.INFO)) log.info(client.toString()); String EXP_Format_Value = null; EXP_Format_Value = rootElement.getNodeName(); - log.info("EXP_Format_Value = " + EXP_Format_Value); + if (log.isLoggable(Level.INFO)) log.info("EXP_Format_Value = " + EXP_Format_Value); MEXPFormat expFormat = null; expFormat = MEXPFormat.getFormatByValueAD_Client_IDAndVersion(ctx, EXP_Format_Value, client.getAD_Client_ID(), version, trxName); @@ -156,19 +156,19 @@ public class ImportHelper { { throw new Exception(Msg.getMsg(ctx, "XMLClientNotFound")); } - log.info(systemClient.toString()); + if (log.isLoggable(Level.INFO)) log.info(systemClient.toString()); expFormat = MEXPFormat.getFormatByValueAD_Client_IDAndVersion(ctx, EXP_Format_Value, systemClient.getAD_Client_ID(), version, trxName); } if (expFormat == null || expFormat.getEXP_Format_ID() == 0) { throw new Exception(Msg.getMsg(ctx, "EXPFormatNotFound")); } - log.info("expFormat = " + expFormat.toString()); + if (log.isLoggable(Level.INFO)) log.info("expFormat = " + expFormat.toString()); isChanged = false; PO po = importElement(ctx, result, rootElement, expFormat, ReplicationType, trxName); if(!po.is_Changed() && !isChanged) { - log.info("Object not changed = " + po.toString()); + if (log.isLoggable(Level.INFO)) log.info("Object not changed = " + po.toString()); return; } @@ -226,7 +226,7 @@ public class ImportHelper { DocAction document = (DocAction)po; String action = document.getDocAction(); String status = document.getDocStatus(); - log.info("Document:"+document.toString() + " DocStauts:" + status + " DocAction:"+action); + if (log.isLoggable(Level.INFO)) log.info("Document:"+document.toString() + " DocStauts:" + status + " DocAction:"+action); if(ModelValidator.TIMING_AFTER_REVERSECORRECT==ReplicationEvent) { @@ -242,7 +242,7 @@ public class ImportHelper { { if(!document.processIt(action)) { - log.info("PO.toString() = can not " + po.get_Value("DocAction")); + if (log.isLoggable(Level.INFO)) log.info("PO.toString() = can not " + po.get_Value("DocAction")); } po.saveEx(); } @@ -282,7 +282,7 @@ public class ImportHelper { } } - log.info("PO.toString() = " + po.toString()); + if (log.isLoggable(Level.INFO)) log.info("PO.toString() = " + po.toString()); if (po.get_KeyColumns().length < 1) { @@ -300,7 +300,7 @@ public class ImportHelper { for (MEXPFormatLine formatLine : formatLines) { log.info("=================== Beginnig of Format Line ==============================="); - log.info("formatLine: [" + formatLine.toString() + "]"); + if (log.isLoggable(Level.INFO)) log.info("formatLine: [" + formatLine.toString() + "]"); //Get the value Object value = getValueFromFormat(formatLine,po,rootElement,result,ReplicationType); if (value == null || value.toString().equals("")) @@ -331,7 +331,7 @@ public class ImportHelper { { // XML Element value = XMLHelper.getString(line.getValue(), rootElement); - log.info("value=[" + value + "]"); + if (log.isLoggable(Level.INFO)) log.info("value=[" + value + "]"); } else if (MEXPFormatLine.TYPE_ReferencedEXPFormat.equals(line.getType())) @@ -339,29 +339,29 @@ public class ImportHelper { // Referenced Export Format //get from cache MEXPFormat referencedExpFormat = MEXPFormat.get(ctx, line.getEXP_EmbeddedFormat_ID(), po.get_TrxName()); - log.info("referencedExpFormat = " + referencedExpFormat); + if (log.isLoggable(Level.INFO)) log.info("referencedExpFormat = " + referencedExpFormat); int refRecord_ID = 0; // Find Record_ID by ???Value??? In fact by Columns set as Part Of Unique Index in Export Format! String xPath = null; xPath = "" + line.getValue() + ""; - log.info("Seach for XML Element = " + xPath); + if (log.isLoggable(Level.INFO)) log.info("Seach for XML Element = " + xPath); Element referencedNode = XMLHelper.getElement(xPath, rootElement); - log.info("referencedNode = " + referencedNode); + if (log.isLoggable(Level.INFO)) log.info("referencedNode = " + referencedNode); if(referencedNode!=null) { refRecord_ID = getID(ctx, referencedExpFormat, referencedNode, line.getValue(), po.get_TrxName()); - log.info("refRecord_ID = " + refRecord_ID); + if (log.isLoggable(Level.INFO)) log.info("refRecord_ID = " + refRecord_ID); value = new Integer(refRecord_ID); } else { - log.info("NULL VALUE FOR " + xPath.toString()); + if (log.isLoggable(Level.INFO)) log.info("NULL VALUE FOR " + xPath.toString()); value=null; } - log.info("value=[" + value + "]"); + if (log.isLoggable(Level.INFO)) log.info("value=[" + value + "]"); } else if (MEXPFormatLine.TYPE_EmbeddedEXPFormat.equals(line.getType())) { @@ -379,22 +379,22 @@ public class ImportHelper { // Embedded Export Format It is used for Parent-Son records like Order&OrderLine //get from cache MEXPFormat referencedExpFormat = MEXPFormat.get(ctx, line.getEXP_EmbeddedFormat_ID(), po.get_TrxName()); - log.info("embeddedExpFormat = " + referencedExpFormat); + if (log.isLoggable(Level.INFO)) log.info("embeddedExpFormat = " + referencedExpFormat); NodeList nodeList = XMLHelper.getNodeList("/"+rootElement.getNodeName() + "/" + line.getValue(), rootElement); for (int j = 0; j < nodeList.getLength(); j++) { Element referencedElement = (Element)nodeList.item(j); - log.info("EmbeddedEXPFormat - referencedElement.getNodeName = " + referencedElement.getNodeName()); + if (log.isLoggable(Level.INFO)) log.info("EmbeddedEXPFormat - referencedElement.getNodeName = " + referencedElement.getNodeName()); PO embeddedPo = null; // Import embedded PO log.info("=== BEGIN RECURSION CALL ==="); embeddedPo = importElement(ctx, result, referencedElement, referencedExpFormat,ReplicationType, po.get_TrxName()); - log.info("embeddedPo = " + embeddedPo); + if (log.isLoggable(Level.INFO)) log.info("embeddedPo = " + embeddedPo); if(!embeddedPo.is_Changed()) { - log.info("Object not changed = " + po.toString()); + if (log.isLoggable(Level.INFO)) log.info("Object not changed = " + po.toString()); continue; } else @@ -411,7 +411,7 @@ public class ImportHelper { { // XML Attribute value = XMLHelper.getString("@" + line.getValue(), rootElement); - log.info("value=[" + value + "]"); + if (log.isLoggable(Level.INFO)) log.info("value=[" + value + "]"); } else { @@ -433,7 +433,7 @@ public class ImportHelper { private void setReplicaValues(Object value,MEXPFormatLine line,PO po,StringBuffer result)throws Exception { MColumn column = MColumn.get(ctx, line.getAD_Column_ID()); - log.info("column=[" + column + "]"); + if (log.isLoggable(Level.INFO)) log.info("column=[" + column + "]"); if (value !=null) { @@ -457,12 +457,12 @@ public class ImportHelper { { clazz = String.class; } - log.info("clazz = " + clazz.getName()); + if (log.isLoggable(Level.INFO)) log.info("clazz = " + clazz.getName()); // Handle Date and Time value = handleDateTime(value, column, line); - log.info("formatLinesType = " + line.getType()); + if (log.isLoggable(Level.INFO)) log.info("formatLinesType = " + line.getType()); if (MEXPFormatLine.TYPE_EmbeddedEXPFormat.equals( line.getType() ) ) { @@ -475,7 +475,7 @@ public class ImportHelper { { // po.set_ValueOfColumn(line.getAD_Column_ID(), value); - log.info("Set value of column ["+column.getColumnName()+"]=["+value+"]"); + if (log.isLoggable(Level.INFO)) log.info("Set value of column ["+column.getColumnName()+"]=["+value+"]"); } else if ( DisplayType.isID(column.getAD_Reference_ID()) || DisplayType.Integer == column.getAD_Reference_ID() @@ -491,11 +491,11 @@ public class ImportHelper { value=null; } - log.info("About to set int value of column ["+column.getColumnName()+"]=["+value+"]"); + if (log.isLoggable(Level.INFO)) log.info("About to set int value of column ["+column.getColumnName()+"]=["+value+"]"); po.set_ValueOfColumn(line.getAD_Column_ID(), value); - log.info("Set int value of column ["+column.getColumnName()+"]=["+value+"]"); + if (log.isLoggable(Level.INFO)) log.info("Set int value of column ["+column.getColumnName()+"]=["+value+"]"); } else if ( DisplayType.isNumeric(column.getAD_Reference_ID()) @@ -512,11 +512,11 @@ public class ImportHelper { } //value = new Double( doubleValue ); - log.info("About to set BigDecimal value of column ["+column.getColumnName()+"]=["+value+"]"); + if (log.isLoggable(Level.INFO)) log.info("About to set BigDecimal value of column ["+column.getColumnName()+"]=["+value+"]"); po.set_ValueOfColumn(line.getAD_Column_ID(), value); - log.info("Set BigDecimal value of column ["+column.getColumnName()+"]=["+value+"]"); + if (log.isLoggable(Level.INFO)) log.info("Set BigDecimal value of column ["+column.getColumnName()+"]=["+value+"]"); } else if(DisplayType.YesNo == column.getAD_Reference_ID()) { @@ -530,7 +530,7 @@ public class ImportHelper { { // try { - log.info("About to set value of column ["+column.getColumnName()+"]=["+value+"]"); + if (log.isLoggable(Level.INFO)) log.info("About to set value of column ["+column.getColumnName()+"]=["+value+"]"); if(clazz == Boolean.class) { @@ -542,7 +542,7 @@ public class ImportHelper { po.set_ValueOfColumn(line.getAD_Column_ID(), clazz.cast(value)); } - log.info("Set value of column ["+column.getColumnName()+"]=["+value+"]"); + if (log.isLoggable(Level.INFO)) log.info("Set value of column ["+column.getColumnName()+"]=["+value+"]"); } catch (ClassCastException ex) { @@ -593,13 +593,15 @@ public class ImportHelper { throw new IllegalArgumentException("expFormat, rootNode and RootnodeName can't be null!"); } - log.info("expFormat = " + expFormat); - log.info("rootNode.getNodeName() = " + rootElement.getNodeName()); - log.info("rootNodeName = " + rootNodeName); + if (log.isLoggable(Level.INFO)) { + log.info("expFormat = " + expFormat); + log.info("rootNode.getNodeName() = " + rootElement.getNodeName()); + log.info("rootNodeName = " + rootNodeName); + } if (rootElement.getParentNode() != null) { - log.info("rootNode.ParentName = " + rootElement.getParentNode().getNodeName()); + if (log.isLoggable(Level.INFO)) log.info("rootNode.ParentName = " + rootElement.getParentNode().getNodeName()); } // Get list with all Unique columns! @@ -618,7 +620,7 @@ public class ImportHelper { for (MEXPFormatLine uniqueFormatLine : uniqueFormatLines) { MColumn column = MColumn.get(ctx, uniqueFormatLine.getAD_Column_ID()); - log.info("column = ["+column+"]"); + if (log.isLoggable(Level.INFO)) log.info("column = ["+column+"]"); String valuecol=column.getColumnName(); formatLines = formatLines + "|"+ valuecol; @@ -629,28 +631,28 @@ public class ImportHelper { String xPath = null; xPath = ""+ uniqueFormatLine.getValue(); cols[col] = XMLHelper.getString(xPath, rootElement); - log.info("values[" + col + "]=" + cols[col]); + if (log.isLoggable(Level.INFO)) log.info("values[" + col + "]=" + cols[col]); } else if (MEXPFormatLine.TYPE_ReferencedEXPFormat.equals(uniqueFormatLine.getType())) { // Referenced Export Format - log.info("referencedExpFormat.EXP_EmbeddedFormat_ID = " + uniqueFormatLine.getEXP_EmbeddedFormat_ID()); + if (log.isLoggable(Level.INFO)) log.info("referencedExpFormat.EXP_EmbeddedFormat_ID = " + uniqueFormatLine.getEXP_EmbeddedFormat_ID()); //get from cache MEXPFormat referencedExpFormat = MEXPFormat.get(ctx, uniqueFormatLine.getEXP_EmbeddedFormat_ID(), trxName); - log.info("referencedExpFormat = " + referencedExpFormat); + if (log.isLoggable(Level.INFO)) log.info("referencedExpFormat = " + referencedExpFormat); int record_ID = 0; // Find Record_ID by ???Value??? In fact by Columns set as Part Of Unique Index in Export Format! Element referencedNode = ((Element) rootElement.getElementsByTagName(uniqueFormatLine.getValue()).item(0)); - log.info("referencedNode = " + referencedNode); + if (log.isLoggable(Level.INFO)) log.info("referencedNode = " + referencedNode); if (referencedNode == null) { throw new IllegalArgumentException("referencedNode can't be found!"); } record_ID = getID(ctx, referencedExpFormat, referencedNode, uniqueFormatLine.getValue(), trxName); - log.info("record_ID = " + record_ID); + if (log.isLoggable(Level.INFO)) log.info("record_ID = " + record_ID); cols[col] = new Integer(record_ID); } @@ -754,7 +756,7 @@ public class ImportHelper { record_id = po.get_ID(); } - log.info("record_id = " + record_id); + if (log.isLoggable(Level.INFO)) log.info("record_id = " + record_id); return record_id; } @@ -773,7 +775,7 @@ public class ImportHelper { { m_customDateFormat = new SimpleDateFormat( formatLine.getDateFormat() ); // "MM/dd/yyyy"; MM/dd/yyyy hh:mm:ss result = new Timestamp(m_customDateFormat.parse(valueString).getTime()); - log.info("Custom Date Format; Parsed value = " + result.toString()); + if (log.isLoggable(Level.INFO)) log.info("Custom Date Format; Parsed value = " + result.toString()); } else { @@ -800,7 +802,7 @@ public class ImportHelper { { m_customDateFormat = new SimpleDateFormat( formatLine.getDateFormat() ); // "MM/dd/yyyy" result = new Timestamp(m_customDateFormat.parse(valueString).getTime()); - log.info("Custom Date Format; Parsed value = " + result.toString()); + if (log.isLoggable(Level.INFO)) log.info("Custom Date Format; Parsed value = " + result.toString()); } else { diff --git a/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ModelImporter.java b/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ModelImporter.java index e03c5ed0b5..d38becb7a9 100755 --- a/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ModelImporter.java +++ b/org.adempiere.replication/src/org/adempiere/process/rpl/imp/ModelImporter.java @@ -106,7 +106,7 @@ public class ModelImporter extends SvrProcess { p_FileName = fileNameOr; } - log.info(sb.toString()); + if (log.isLoggable(Level.INFO)) log.info(sb.toString()); } /** diff --git a/org.adempiere.report.jasper.webapp/src/org/compiere/utils/MD5Impl.java b/org.adempiere.report.jasper.webapp/src/org/compiere/utils/MD5Impl.java index 1eb367679c..834126dd6e 100644 --- a/org.adempiere.report.jasper.webapp/src/org/compiere/utils/MD5Impl.java +++ b/org.adempiere.report.jasper.webapp/src/org/compiere/utils/MD5Impl.java @@ -7,6 +7,7 @@ package org.compiere.utils; import java.net.URL; +import java.util.logging.Level; import org.compiere.util.CLogger; import org.compiere.utils.DigestOfFile; @@ -42,7 +43,7 @@ public class MD5Impl { URL currentFile = Thread.currentThread().getContextClassLoader().getResource(filepartOnly); System.out.println(filepartOnly); absoluteFilename = currentFile.getFile(); - log.info("decoded absolute path name for "+filepartOnly +" is "+absoluteFilename); + if (log.isLoggable(Level.INFO)) log.info("decoded absolute path name for "+filepartOnly +" is "+absoluteFilename); } else { diff --git a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java b/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java index 70e74deb43..9f213ed9f9 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java +++ b/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java @@ -218,7 +218,7 @@ public class ReportStarter implements ProcessCall, ClientProcess { File reportFile = null; File downloadedFile = null; - log.info(" report deployed to " + reportLocation); + if (log.isLoggable(Level.INFO)) log.info(" report deployed to " + reportLocation); try { @@ -234,16 +234,16 @@ public class ReportStarter implements ProcessCall, ClientProcess { String localMD5hash = DigestOfFile.GetLocalMD5Hash(reportFile); String remoteMD5Hash = getRemoteMD5(reportLocation); - log.info("MD5 for local file is "+localMD5hash ); + if (log.isLoggable(Level.INFO)) log.info("MD5 for local file is "+localMD5hash ); if ( remoteMD5Hash != null) { if (localMD5hash.equals(remoteMD5Hash)) { - log.info(" no need to download: local report is up-to-date"); + if (log.isLoggable(Level.INFO)) log.info(" no need to download: local report is up-to-date"); } else { - log.info(" report on server is different that local one, download and replace"); + if (log.isLoggable(Level.INFO)) log.info(" report on server is different that local one, download and replace"); downloadedFile = getRemoteFile(reportLocation, downloadedLocalFile); reportFile.delete(); downloadedFile.renameTo(reportFile); @@ -257,11 +257,11 @@ public class ReportStarter implements ProcessCall, ClientProcess if ( DigestOfFile.md5localHashCompare(reportFile,downloadedFile) ) { //nothing file are identical - log.info(" no need to replace your existing report"); + if (log.isLoggable(Level.INFO)) log.info(" no need to replace your existing report"); } else { - log.info(" report on server is different that local one, replacing"); + if (log.isLoggable(Level.INFO)) log.info(" report on server is different that local one, replacing"); reportFile.delete(); downloadedFile.renameTo(reportFile); } @@ -355,7 +355,7 @@ public class ReportStarter implements ProcessCall, ClientProcess int AD_PInstance_ID=pi.getAD_PInstance_ID(); int Record_ID=pi.getRecord_ID(); - log.info( "Name="+Name+" AD_PInstance_ID="+AD_PInstance_ID+" Record_ID="+Record_ID); + if (log.isLoggable(Level.INFO)) log.info( "Name="+Name+" AD_PInstance_ID="+AD_PInstance_ID+" Record_ID="+Record_ID); String trxName = null; if (trx != null) { trxName = trx.getTrxName(); @@ -609,7 +609,7 @@ public class ReportStarter implements ProcessCall, ClientProcess { if (reportData.isDirectPrint()) { - log.info( "ReportStarter.startProcess print report -" + jasperPrint.getName()); + if (log.isLoggable(Level.INFO)) log.info( "ReportStarter.startProcess print report -" + jasperPrint.getName()); //RF 1906632 if (!processInfo.isBatch()) { @@ -670,7 +670,7 @@ public class ReportStarter implements ProcessCall, ClientProcess // You can use JasperPrint to create PDF // JasperExportManager.exportReportToPdfFile(jasperPrint, "BasicReport.pdf"); } else { - log.info( "ReportStarter.startProcess run report -"+jasperPrint.getName()); + if (log.isLoggable(Level.INFO)) log.info( "ReportStarter.startProcess run report -"+jasperPrint.getName()); JRViewerProvider viewerLauncher = Service.locator().locate(JRViewerProvider.class).getService(); viewerLauncher.openViewer(jasperPrint, pi.getTitle()+" - " + reportPath); } @@ -931,11 +931,13 @@ public class ReportStarter implements ProcessCall, ClientProcess File reportFile; String name = reportPath.substring("resource:".length()).trim(); String localName = name.replace('/', '_'); - log.info("reportPath = " + reportPath); - log.info("getting resource from = " + getClass().getClassLoader().getResource(name)); + if (log.isLoggable(Level.INFO)) { + log.info("reportPath = " + reportPath); + log.info("getting resource from = " + getClass().getClassLoader().getResource(name)); + } InputStream inputStream = getClass().getClassLoader().getResourceAsStream(name); String localFile = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + localName; - log.info("localFile = " + localFile); + if (log.isLoggable(Level.INFO)) log.info("localFile = " + localFile); reportFile = new File(localFile); OutputStream out = null; @@ -1032,7 +1034,7 @@ public class ReportStarter implements ProcessCall, ClientProcess * @return */ protected JasperData processReport( File reportFile) { - log.info( "reportFile.getAbsolutePath() = "+reportFile.getAbsolutePath()); + if (log.isLoggable(Level.INFO)) log.info( "reportFile.getAbsolutePath() = "+reportFile.getAbsolutePath()); JasperReport jasperReport = null; String jasperName = reportFile.getName(); @@ -1044,7 +1046,7 @@ public class ReportStarter implements ProcessCall, ClientProcess File jasperFile = new File( reportDir.getAbsolutePath(), jasperName+".jasper"); if (jasperFile.exists()) { // test time if (reportFile.lastModified() == jasperFile.lastModified()) { - log.info(" no need to compile use "+jasperFile.getAbsolutePath()); + if (log.isLoggable(Level.INFO)) log.info(" no need to compile use "+jasperFile.getAbsolutePath()); try { jasperReport = (JasperReport)JRLoader.loadObjectFromFile(jasperFile.getAbsolutePath()); } catch (JRException e) { diff --git a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapMessage.java b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapMessage.java index ff0d77129d..5582fdd305 100644 --- a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapMessage.java +++ b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapMessage.java @@ -124,14 +124,13 @@ public class LdapMessage // // Payload - if (m_protocolOp == BIND_REQUEST) + if (m_protocolOp == BIND_REQUEST) { handleBind(); - else if (m_protocolOp == UNBIND_REQUEST) - log.info("#" + msgId + ": unbind"); - else if (m_protocolOp == SEARCH_REQUEST) - handleSearch(); - else // Only supoort BIND, UNBIND and SEARCH - { + } else if (m_protocolOp == UNBIND_REQUEST) { + if (log.isLoggable(Level.INFO)) log.info("#" + msgId + ": unbind"); + } else if (m_protocolOp == SEARCH_REQUEST) { + handleSearch(); + } else { // Only supoort BIND, UNBIND and SEARCH result.setErrorNo(LdapResult.LDAP_PROTOCOL_ERROR); result.setErrorString(": Unsupported Request"); log.warning("#" + msgId + ": Unknown Op + " + m_protocolOp); @@ -203,7 +202,7 @@ public class LdapMessage { result.setErrorNo(LdapResult.LDAP_PROTOCOL_ERROR); result.setErrorString("Unsupported LDAP version"); - log.info("#" + msgId + ": unsupported LDAP version - " + version); + if (log.isLoggable(Level.INFO)) log.info("#" + msgId + ": unsupported LDAP version - " + version); return; } @@ -215,7 +214,7 @@ public class LdapMessage if (auth != SIMPLE_AUTHENTICATION) // 0x80 - simple authentication { result.setErrorNo(LdapResult.LDAP_AUTH_METHOD_NOT_SUPPORTED); - log.info("#" + msgId + ": unsupported authentication method - " + auth); + if (log.isLoggable(Level.INFO)) log.info("#" + msgId + ": unsupported authentication method - " + auth); return; } @@ -228,13 +227,13 @@ public class LdapMessage { result.setErrorNo(LdapResult.LDAP_NO_SUCH_OBJECT); result.setErrorString(": \"cn\" not defined"); - log.info("#" + msgId + ": \"cn\" not defined"); + if (log.isLoggable(Level.INFO)) log.info("#" + msgId + ": \"cn\" not defined"); return; } } // Log the information - log.info("#" + msgId + ": bind - version=" + version + ", userId=" + userId); + if (log.isLoggable(Level.INFO)) log.info("#" + msgId + ": bind - version=" + version + ", userId=" + userId); } catch (Exception ex) { diff --git a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapResult.java b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapResult.java index 43b30b30cf..01f2be5597 100644 --- a/org.adempiere.server/src/main/server/org/compiere/ldap/LdapResult.java +++ b/org.adempiere.server/src/main/server/org/compiere/ldap/LdapResult.java @@ -132,7 +132,7 @@ public class LdapResult generateResult("", LdapMessage.BIND_RESPONSE, LDAP_INAPPROPRIATE_AUTHENTICATION, ldapErrorMessage[LDAP_INAPPROPRIATE_AUTHENTICATION]); - log.info("Failed : " + ldapErrorMessage[LDAP_INAPPROPRIATE_AUTHENTICATION]); + if (log.isLoggable(Level.INFO)) log.info("Failed : " + ldapErrorMessage[LDAP_INAPPROPRIATE_AUTHENTICATION]); } } else if (ldapMsg.getOperation() == LdapMessage.SEARCH_REQUEST) diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java index 66d4fe90d8..bdd8e2c77c 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServer.java @@ -219,8 +219,7 @@ public abstract class AdempiereServer implements Runnable p_model.getFrequency(), p_model.getCronPattern()); m_sleepMS = m_nextWork - now; - if (log.isLoggable(Level.INFO)) - log.info(" Next run: " + new Timestamp(m_nextWork) + " sleep " + m_sleepMS); + if (log.isLoggable(Level.INFO)) log.info(" Next run: " + new Timestamp(m_nextWork) + " sleep " + m_sleepMS); // p_model.setDateLastRun(lastRun); p_model.setDateNextRun(new Timestamp(m_nextWork)); diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerGroup.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerGroup.java index 798d505540..9393de0eb2 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerGroup.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerGroup.java @@ -50,7 +50,7 @@ public class AdempiereServerGroup extends ThreadGroup super ("AdempiereServers"); setDaemon(true); setMaxPriority(Thread.MAX_PRIORITY); - log.info(getName() + " - Parent=" + getParent()); + if (log.isLoggable(Level.INFO)) log.info(getName() + " - Parent=" + getParent()); } // AdempiereServerGroup /** Logger */ @@ -63,7 +63,7 @@ public class AdempiereServerGroup extends ThreadGroup */ public void uncaughtException (Thread t, Throwable e) { - log.info ("uncaughtException = " + e.toString()); + if (log.isLoggable(Level.INFO)) log.info ("uncaughtException = " + e.toString()); super.uncaughtException (t, e); } // uncaughtException diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java index 8ac348dd16..32f5ca73da 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AdempiereServerMgr.java @@ -250,7 +250,7 @@ public class AdempiereServerMgr { if (server.scheduleFuture != null && !server.scheduleFuture.isDone()) { - log.info("Alive: " + server); + if (log.isLoggable(Level.INFO)) log.info("Alive: " + server); noRunning++; } else @@ -292,7 +292,7 @@ public class AdempiereServerMgr log.log(Level.SEVERE, "Server=" + serverID, e); return false; } - log.info(server.toString()); + if (log.isLoggable(Level.INFO)) log.info(server.toString()); return (server.scheduleFuture != null && !server.scheduleFuture.isDone()); } // startIt @@ -360,7 +360,7 @@ public class AdempiereServerMgr } else { - log.info ("Stopped: " + server); + if (log.isLoggable(Level.INFO)) log.info ("Stopped: " + server); noStopped++; } } @@ -398,7 +398,7 @@ public class AdempiereServerMgr log.log(Level.SEVERE, "stop", e); return false; } - log.info(server.toString()); + if (log.isLoggable(Level.INFO)) log.info(server.toString()); return (server.scheduleFuture == null || server.scheduleFuture.isDone()); } // stop diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java index 1ce38ada27..d0da2a0fa7 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java @@ -123,7 +123,7 @@ public class AlertProcessor extends AdempiereServer { if (!alert.isValid()) return false; - log.info("" + alert); + if (log.isLoggable(Level.INFO)) log.info("" + alert); StringBuffer message = new StringBuffer(alert.getAlertMessage()) .append(Env.NL); diff --git a/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java index f08cecf94f..9dd5e44496 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/EMailProcessor.java @@ -259,7 +259,7 @@ public class EMailProcessor noProcessed++; } - log.info("processInBox - Total=" + noProcessed + " - Errors=" + noError); + if (log.isLoggable(Level.INFO)) log.info("processInBox - Total=" + noProcessed + " - Errors=" + noError); // Fini errorFolder.close(false); requestFolder.close(false); diff --git a/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java b/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java index 2b8d1380ab..5d96657b73 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/Scheduler.java @@ -150,7 +150,7 @@ public class Scheduler extends AdempiereServer */ private String runProcess(MProcess process) throws Exception { - log.info(process.toString()); + if (log.isLoggable(Level.INFO)) log.info(process.toString()); boolean isReport = (process.isReport() || process.getAD_ReportView_ID() > 0); diff --git a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java index 36f006d63a..19147dd331 100644 --- a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java +++ b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitor.java @@ -179,7 +179,7 @@ public class AdempiereMonitor extends HttpServlet if (serverID == null || serverID.length() == 0) return false; - log.info ("ServerID=" + serverID); + if (log.isLoggable(Level.INFO)) log.info ("ServerID=" + serverID); ServerWrapper server = m_serverMgr.getServer(serverID); if (server == null || server.getServer() == null) { @@ -250,7 +250,7 @@ public class AdempiereMonitor extends HttpServlet if (serverID == null || serverID.length() == 0) return false; - log.info ("ServerID=" + serverID); + if (log.isLoggable(Level.INFO)) log.info ("ServerID=" + serverID); ServerWrapper server = m_serverMgr.getServer(serverID); if (server == null || server.getServer() == null) { @@ -274,7 +274,7 @@ public class AdempiereMonitor extends HttpServlet String action = WebUtil.getParameter (request, "Action"); if (action == null || action.length() == 0) return; - log.info ("Action=" + action); + if (log.isLoggable(Level.INFO)) log.info ("Action=" + action); try { boolean start = action.startsWith("Start"); @@ -346,7 +346,7 @@ public class AdempiereMonitor extends HttpServlet String traceLevel = WebUtil.getParameter (request, "TraceLevel"); if (traceLevel != null && traceLevel.length() > 0) { - log.info ("New Level: " + traceLevel); + if (log.isLoggable(Level.INFO)) log.info ("New Level: " + traceLevel); CLogMgt.setLevel(traceLevel); Ini.setProperty(Ini.P_TRACELEVEL, traceLevel); Ini.saveProperties(false); @@ -356,7 +356,7 @@ public class AdempiereMonitor extends HttpServlet if (traceCmd == null || traceCmd.length() == 0) return false; - log.info ("Command: " + traceCmd); + if (log.isLoggable(Level.INFO)) log.info ("Command: " + traceCmd); CLogFile fileHandler = CLogFile.get (false, null, false); // if (traceCmd.equals("ROTATE")) @@ -424,7 +424,7 @@ public class AdempiereMonitor extends HttpServlet } // Stream Log - log.info ("Streaming: " + traceCmd); + if (log.isLoggable(Level.INFO)) log.info ("Streaming: " + traceCmd); try { long time = System.currentTimeMillis(); // timer start @@ -447,7 +447,7 @@ public class AdempiereMonitor extends HttpServlet // time = System.currentTimeMillis() - time; double speed = (fileLength/(double)1024) / (time/(double)1000); - log.info("length=" + if (log.isLoggable(Level.INFO)) log.info("length=" + fileLength + " - " + time + " ms - " + speed + " kB/sec"); @@ -493,7 +493,7 @@ public class AdempiereMonitor extends HttpServlet // log.info ("Test EMail: " + AD_Client_ID); MClient client = MClient.get(new Properties(), AD_Client_ID); - log.info ("Test: " + client); + if (log.isLoggable(Level.INFO)) log.info ("Test: " + client); m_message = new p(); m_message.addElement(client.getName() + ": " + client.testEMail()); diff --git a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitorFilter.java b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitorFilter.java index 39bba50d06..2880118a50 100644 --- a/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitorFilter.java +++ b/org.adempiere.server/src/main/servlet/org/compiere/web/AdempiereMonitorFilter.java @@ -155,7 +155,7 @@ public class AdempiereMonitorFilter implements Filter log.warning ("Not a Sys Admin = " + name); return false; } - log.info ("Name=" + name); + if (log.isLoggable(Level.INFO)) log.info ("Name=" + name); return true; } catch (Exception e) diff --git a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/HtmlDashboard.java b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/HtmlDashboard.java index 9b600eab1d..af4fe097a6 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/HtmlDashboard.java +++ b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/HtmlDashboard.java @@ -294,7 +294,7 @@ public class HtmlDashboard extends JPanel implements MouseListener, queryZoom.add(query); } else { - log.info("Nothing to zoom to - " + bgc); + if (log.isLoggable(Level.INFO)) log.info("Nothing to zoom to - " + bgc); output.append(bgc.getValue()); } output.append(""); diff --git a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PAPanel.java b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PAPanel.java index 1b4e0dc0bd..00505157b2 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PAPanel.java +++ b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/PAPanel.java @@ -20,6 +20,7 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.logging.Level; import javax.swing.Box; import javax.swing.JScrollPane; @@ -174,7 +175,7 @@ public class PAPanel extends CPanel implements ActionListener if (e.getSource() instanceof PerformanceIndicator) { PerformanceIndicator pi = (PerformanceIndicator)e.getSource(); - log.info(pi.getName()); + if (log.isLoggable(Level.INFO)) log.info(pi.getName()); MGoal goal = pi.getGoal(); if (goal.getMeasure() != null) new PerformanceDetail(goal); diff --git a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/ViewPI.java b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/ViewPI.java index 67d10a603f..958fe5b9d1 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/apps/graph/ViewPI.java +++ b/org.adempiere.ui.swing/src/org/adempiere/apps/graph/ViewPI.java @@ -138,7 +138,7 @@ implements FormPanel, ActionListener else if (e.getSource() instanceof PerformanceIndicator) { PerformanceIndicator pi = (PerformanceIndicator)e.getSource(); - log.info(pi.getName()); + if (log.isLoggable(Level.INFO)) log.info(pi.getName()); MGoal goal = pi.getGoal(); if (goal.getMeasure() != null) new PerformanceDetail(goal); diff --git a/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditor.java b/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditor.java index 2b8843f29d..7d5437de7b 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditor.java +++ b/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditor.java @@ -466,7 +466,7 @@ public class PLAFEditor extends JDialog themeField.setSelectedItem(theme); } m_setting = false; - log.info(lookFeel + " - " + metalTheme); + if (log.isLoggable(Level.INFO)) log.info(lookFeel + " - " + metalTheme); } // setLFSelection diff --git a/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditorPanel.java b/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditorPanel.java index d3f7e9c315..a73378501a 100644 --- a/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditorPanel.java +++ b/org.adempiere.ui.swing/src/org/adempiere/plaf/PLAFEditorPanel.java @@ -26,6 +26,7 @@ import java.awt.event.KeyAdapter; import java.awt.event.MouseAdapter; import java.awt.image.BufferedImage; import java.util.ResourceBundle; +import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.BorderFactory; @@ -354,7 +355,7 @@ public class PLAFEditorPanel extends CPanel { themeList.setSelectedValue(theme, true); } m_setting = false; - log.info(lookFeel + " - " + metalTheme); + if (log.isLoggable(Level.INFO)) log.info(lookFeel + " - " + metalTheme); } // setLFSelection /** diff --git a/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java b/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java index 2abf2ad33e..de0703ca57 100644 --- a/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java +++ b/org.adempiere.ui.swing/src/org/compiere/AdempiereClient.java @@ -71,7 +71,7 @@ public final class AdempiereClient // Init Log log = CLogger.getCLogger(AdempiereClient.class); // Greeting - log.info(Adempiere.getSummaryAscii()); + if (log.isLoggable(Level.INFO)) log.info(Adempiere.getSummaryAscii()); // log.info(getAdempiereHome() + " - " + getJavaInfo() + " - " + getOSInfo()); // Load System environment diff --git a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java index 727f516263..636c60833f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/acct/AcctViewer.java @@ -101,7 +101,7 @@ public class AcctViewer extends CFrame public AcctViewer(int AD_Client_ID, int AD_Table_ID, int Record_ID) { super (Msg.getMsg(Env.getCtx(), "AcctViewer")); - log.info("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); setDefaultCloseOperation(DISPOSE_ON_CLOSE); m_data = new AcctViewerData (Env.getCtx(), AEnv.createWindowNo(this), AD_Client_ID, AD_Table_ID); @@ -457,7 +457,7 @@ public class AcctViewer extends CFrame */ public void stateChanged(ChangeEvent e) { - // log.info( "AcctViewer.stateChanged"); + // if (log.isLoggable(Level.INFO)) log.info( "AcctViewer.stateChanged"); boolean visible = m_data.documentQuery && tabbedPane.getSelectedIndex() == 1; bRePost.setVisible(visible); bExport.setVisible(tabbedPane.getSelectedIndex() == 1); @@ -503,7 +503,7 @@ public class AcctViewer extends CFrame return; m_data.C_AcctSchema_ID = kp.getKey(); m_data.ASchema = MAcctSchema.get(Env.getCtx(), m_data.C_AcctSchema_ID); - log.info(m_data.ASchema.toString()); + if (log.isLoggable(Level.INFO)) log.info(m_data.ASchema.toString()); // // Sort Options sortBy1.removeAllItems(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java index c2aeb7fb26..0922c396d5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ADialog.java @@ -62,7 +62,7 @@ public final class ADialog */ public static void info (int WindowNo, Container c, String clearHeading, String clearMessage, String clearText) { - log.info(clearHeading + if (log.isLoggable(Level.INFO)) log.info(clearHeading + ": " + clearMessage + " " + clearText); String out = clearMessage; if (clearText != null && !clearText.equals("")) @@ -101,7 +101,7 @@ public final class ADialog */ public static void info (int WindowNo, Container c, String AD_Message, String msg) { - log.info(AD_Message + " - " + msg); + if (log.isLoggable(Level.INFO)) log.info(AD_Message + " - " + msg); Properties ctx = Env.getCtx(); StringBuilder out = new StringBuilder(); if (AD_Message != null && !AD_Message.equals("")) @@ -154,7 +154,7 @@ public final class ADialog */ public static void warn (int WindowNo, Container c, String AD_Message, String msg) { - log.info(AD_Message + " - " + msg); + if (log.isLoggable(Level.INFO)) log.info(AD_Message + " - " + msg); Properties ctx = Env.getCtx(); StringBuilder out = new StringBuilder(); if (AD_Message != null && !AD_Message.equals("")) @@ -207,7 +207,7 @@ public final class ADialog */ public static void error (int WindowNo, Container c, String AD_Message, String msg) { - log.info(AD_Message + " - " + msg); + if (log.isLoggable(Level.INFO)) log.info(AD_Message + " - " + msg); if (CLogMgt.isLevelFinest()) Trace.printStack(); Properties ctx = Env.getCtx(); @@ -263,7 +263,7 @@ public final class ADialog */ public static boolean ask (int WindowNo, Container c, String AD_Message, String msg) { - log.info(AD_Message + " - " + msg); + if (log.isLoggable(Level.INFO)) log.info(AD_Message + " - " + msg); Properties ctx = Env.getCtx(); StringBuilder out = new StringBuilder(); if (AD_Message != null && !AD_Message.equals("")) @@ -332,7 +332,7 @@ public final class ADialog */ public static void clear (int WindowNo, Container c, String ParseString) { - log.info( "Dialog.clear: " + ParseString); + if (log.isLoggable(Level.INFO)) log.info( "Dialog.clear: " + ParseString); Properties ctx = Env.getCtx(); String parse = Env.parseContext(ctx, WindowNo, ParseString, false); if (parse.length() == 0) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java b/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java index 82afef5f8c..7d5962d029 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AEnv.java @@ -98,7 +98,7 @@ public final class AEnv for (int i = 0; i < s_hiddenWindows.size(); i++) { CFrame hidden = s_hiddenWindows.get(i); - log.info(i + ": " + hidden); + if (log.isLoggable(Level.INFO)) log.info(i + ": " + hidden); if (hidden.getAD_Window_ID() == window.getAD_Window_ID()) return false; // already there } @@ -107,7 +107,7 @@ public final class AEnv if (s_hiddenWindows.add(window)) { window.setVisible(false); - log.info(window.toString()); + if (log.isLoggable(Level.INFO)) log.info(window.toString()); // window.dispatchEvent(new WindowEvent(window, WindowEvent.WINDOW_ICONIFIED)); if (s_hiddenWindows.size() > 10) { CFrame toClose = s_hiddenWindows.remove(0); // sort of lru @@ -137,7 +137,7 @@ public final class AEnv if (hidden.getAD_Window_ID() == AD_Window_ID) { s_hiddenWindows.remove(i); - log.info(hidden.toString()); + if (log.isLoggable(Level.INFO)) log.info(hidden.toString()); hidden.setVisible(true); // De-iconify window - teo_sarca [ 1707221 ] int state = hidden.getExtendedState(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java b/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java index ea0de00648..581c191199 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AMenu.java @@ -110,7 +110,7 @@ public final class AMenu extends CFrame public AMenu () { super(); - log.info("CodeBase=" + Adempiere.getCodeBase()); + if (log.isLoggable(Level.INFO)) log.info("CodeBase=" + Adempiere.getCodeBase()); Splash splash = Splash.getSplash(); // m_WindowNo = AEnv.createWindowNo(this); @@ -598,7 +598,7 @@ public final class AMenu extends CFrame { MTreeNode nd = (MTreeNode)e.getNewValue(); - log.info(nd.getNode_ID() + " - " + nd.toString()); + if (log.isLoggable(Level.INFO)) log.info(nd.getNode_ID() + " - " + nd.toString()); // ignore summary items & when loading if (m_startingItem || nd.isSummary()) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index e0d2787cdb..4f5d7eef88 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -252,7 +252,7 @@ public final class APanel extends CPanel for (int i = 0; i < m_mWorkbench.getWindowCount(); i++) { m_curWindowNo = m_mWorkbench.getWindowNo(i); - log.info("#" + m_curWindowNo); + if (log.isLoggable(Level.INFO)) log.info("#" + m_curWindowNo); Env.setAutoCommit(m_ctx, m_curWindowNo, false); m_mWorkbench.dispose(i); Env.clearWinContext(m_ctx, m_curWindowNo); @@ -675,7 +675,7 @@ public final class APanel extends CPanel */ public boolean initPanel (int AD_Workbench_ID, int AD_Window_ID, MQuery query) { - log.info("WB=" + AD_Workbench_ID + ", Win=" + AD_Window_ID + ", Query=" + query); + if (log.isLoggable(Level.INFO)) log.info("WB=" + AD_Workbench_ID + ", Win=" + AD_Window_ID + ", Query=" + query); this.setName("APanel" + AD_Window_ID); // Single Window @@ -931,7 +931,7 @@ public final class APanel extends CPanel } Dimension size = getPreferredSize(); - log.info( "fini - " + size); + if (log.isLoggable(Level.INFO)) log.info( "fini - " + size); m_curWinTab.requestFocusInWindow(); return true; } // initPanel @@ -1169,7 +1169,7 @@ public final class APanel extends CPanel { if (m_disposing) return; - log.info(e.getMessage()); + if (log.isLoggable(Level.INFO)) log.info(e.getMessage()); String dbInfo = e.getMessage(); if (m_curTab != null && m_curTab.isQueryActive()) dbInfo = "[ " + dbInfo + " ]"; @@ -1345,7 +1345,7 @@ public final class APanel extends CPanel { if (m_disposing) return; - log.info(e.toString()); + if (log.isLoggable(Level.INFO)) log.info(e.toString()); setBusy(true, true); VTabbedPane tp = (VTabbedPane)e.getSource(); @@ -1360,7 +1360,7 @@ public final class APanel extends CPanel int WBIndex = tabPanel.getSelectedIndex(); m_curWindowNo = m_mWorkbench.getWindowNo(WBIndex); // Window Change - log.info("curWin=" + m_curWindowNo + " - Win=" + tp); + if (log.isLoggable(Level.INFO)) log.info("curWin=" + m_curWindowNo + " - Win=" + tp); if (tp.getSelectedComponent() instanceof JTabbedPane) m_curWinTab = (JTabbedPane)tp.getSelectedComponent(); else @@ -1379,7 +1379,7 @@ public final class APanel extends CPanel else { // Just a Tab Change - log.info("Tab=" + tp); + if (log.isLoggable(Level.INFO)) log.info("Tab=" + tp); m_curWinTab = tp; int tpIndex = m_curWinTab.getSelectedIndex(); // detect no tab change @@ -1696,7 +1696,7 @@ public final class APanel extends CPanel */ public void actionPerformed (ActionEvent e) { - log.info(e.getActionCommand() + " - " + e.getModifiers()); + if (log.isLoggable(Level.INFO)) log.info(e.getActionCommand() + " - " + e.getModifiers()); // + " - " + new Timestamp(e.getWhen()) + " " + isUILocked()); if (m_disposing || isUILocked()) return; @@ -2348,7 +2348,7 @@ public final class APanel extends CPanel private void cmd_zoomAcross() { int record_ID = m_curTab.getRecord_ID(); - log.info("ID=" + record_ID); + if (log.isLoggable(Level.INFO)) log.info("ID=" + record_ID); if (record_ID <= 0) return; @@ -2378,7 +2378,7 @@ public final class APanel extends CPanel private void cmd_request() { int record_ID = m_curTab.getRecord_ID(); - log.info("ID=" + record_ID); + if (log.isLoggable(Level.INFO)) log.info("ID=" + record_ID); if (record_ID <= 0) return; @@ -2396,7 +2396,7 @@ public final class APanel extends CPanel private void cmd_archive() { int record_ID = m_curTab.getRecord_ID(); - log.info("ID=" + record_ID); + if (log.isLoggable(Level.INFO)) log.info("ID=" + record_ID); if (record_ID <= 0) return; @@ -2419,7 +2419,7 @@ public final class APanel extends CPanel { // Get process defined for this tab int AD_Process_ID = m_curTab.getAD_Process_ID(); - log.info("ID=" + AD_Process_ID); + if (log.isLoggable(Level.INFO)) log.info("ID=" + AD_Process_ID); // No report defined if (AD_Process_ID == 0) @@ -2474,7 +2474,7 @@ public final class APanel extends CPanel private void cmd_attachment() { int record_ID = m_curTab.getRecord_ID(); - log.info("Record_ID=" + record_ID); + if (log.isLoggable(Level.INFO)) log.info("Record_ID=" + record_ID); if (record_ID == -1) // No Key { aAttachment.setEnabled(false); @@ -2494,7 +2494,7 @@ public final class APanel extends CPanel private void cmd_chat() { int record_ID = m_curTab.getRecord_ID(); - log.info("Record_ID=" + record_ID); + if (log.isLoggable(Level.INFO)) log.info("Record_ID=" + record_ID); if (record_ID == -1) // No Key { aChat.setEnabled(false); @@ -2529,7 +2529,7 @@ public final class APanel extends CPanel */ private void cmd_lock() { - log.info("Modifiers=" + m_lastModifiers); + if (log.isLoggable(Level.INFO)) log.info("Modifiers=" + m_lastModifiers); if (!m_isPersonalLock) return; int record_ID = m_curTab.getRecord_ID(); @@ -2552,7 +2552,7 @@ public final class APanel extends CPanel */ private void cmd_history() { - log.info(""); + if (log.isLoggable(Level.INFO)) log.info(""); if (m_mWorkbench.getMWindow(getWindowIndex()).isTransaction()) { if (m_curTab.needSave(true, true) && !cmd_save(false)) @@ -2646,7 +2646,7 @@ public final class APanel extends CPanel * @param vButton button */ private void actionButton (VButton vButton){ - log.info(vButton.toString()); + if (log.isLoggable(Level.INFO)) log.info(vButton.toString()); String title = vButton.getDescription(); if (title == null || title.length() == 0) title = vButton.getName(); @@ -3089,7 +3089,7 @@ public final class APanel extends CPanel int ToolBarButton_ID = 0; int[] restrictionList = MToolBarButtonRestrict.getOfWindow(m_ctx, MRole.getDefault().getAD_Role_ID(), m_window.getAD_Window_ID(), false, null); - log.info("restrictionList="+restrictionList.toString()); + if (log.isLoggable(Level.INFO)) log.info("restrictionList="+restrictionList.toString()); for (int i = 0; i < restrictionList.length; i++) { diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java b/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java index c0b60dd349..aa5a68b86d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/AWindow.java @@ -183,7 +183,7 @@ public class AWindow extends CFrame { if (AEnv.hideWindow(this)) return; - log.info(toString()); + if (log.isLoggable(Level.INFO)) log.info(toString()); if (m_APanel != null) m_APanel.dispose(); m_APanel = null; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java b/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java index 2206b4cee4..0d3522c50b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/Attachment.java @@ -503,7 +503,7 @@ public final class Attachment extends CDialog private void saveAttachmentToFile() { int index = cbContent.getSelectedIndex(); - log.info("index=" + index); + if (log.isLoggable(Level.INFO)) log.info("index=" + index); if (m_attachment.getEntryCount() < index) return; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java b/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java index 609402c6fe..0884b2601f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/BeanShellEditor.java @@ -113,7 +113,7 @@ public class BeanShellEditor extends CDialog implements ActionListener m_WindowNo = WindowNo; if (m_WindowNo == 0) m_WindowNo = AEnv.createWindowNo(this); - log.info("Window=" + m_WindowNo); + if (log.isLoggable(Level.INFO)) log.info("Window=" + m_WindowNo); try { jbInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java index fe85bb0781..0be289d9df 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/EMailDialog.java @@ -447,7 +447,7 @@ public class EMailDialog extends CDialog { VLookup source = (VLookup) evt.getSource(); Object value = evt.getNewValue(); - log.info("Value=" + value); + if (log.isLoggable(Level.INFO)) log.info("Value=" + value); if (source.equals(fUser)) { // fUser if (value == null) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/GroovyEditor.java b/org.adempiere.ui.swing/src/org/compiere/apps/GroovyEditor.java index 0a82dfc54d..d3c81c9a5c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/GroovyEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/GroovyEditor.java @@ -103,7 +103,7 @@ public class GroovyEditor extends CDialog implements ActionListener m_WindowNo = WindowNo; if (m_WindowNo == 0) m_WindowNo = AEnv.createWindowNo(this); - log.info("Window=" + m_WindowNo); + if (log.isLoggable(Level.INFO)) log.info("Window=" + m_WindowNo); try { jbInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java index ecf1c011f3..4feb11029d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessDialog.java @@ -100,7 +100,7 @@ public class ProcessDialog extends CFrame public ProcessDialog (GraphicsConfiguration gc, int AD_Process_ID, boolean isSOTrx) { super(gc); - log.info("Process=" + AD_Process_ID + "; SOTrx=" + isSOTrx); + if (log.isLoggable(Level.INFO)) log.info("Process=" + AD_Process_ID + "; SOTrx=" + isSOTrx); enableEvents(AWTEvent.WINDOW_EVENT_MASK); m_AD_Process_ID = AD_Process_ID; m_WindowNo = AEnv.createWindowNo (this); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessModalDialog.java b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessModalDialog.java index 2d59fe31c8..f933628069 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/ProcessModalDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/ProcessModalDialog.java @@ -80,7 +80,7 @@ public class ProcessModalDialog extends CDialog int tableId, int recordId, boolean autoStart) { super(parent, title, true); - log.info("Process=" + AD_Process_ID ); + if (log.isLoggable(Level.INFO)) log.info("Process=" + AD_Process_ID ); m_ctx = ctx; m_processUI = aProcess; m_WindowNo = WindowNo; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/RecordInfo.java b/org.adempiere.ui.swing/src/org/compiere/apps/RecordInfo.java index e40ac8ba03..39490eb34e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/RecordInfo.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/RecordInfo.java @@ -199,7 +199,7 @@ public class RecordInfo extends CDialog if (dse.Record_ID instanceof Integer) Record_ID = ((Integer)dse.Record_ID).intValue(); else - log.info("dynInit - Invalid Record_ID=" + dse.Record_ID); + if (log.isLoggable(Level.INFO)) log.info("dynInit - Invalid Record_ID=" + dse.Record_ID); if (Record_ID == 0) return false; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java index 2709ecf5bd..426fe80443 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/ArchiveViewer.java @@ -273,7 +273,7 @@ public class ArchiveViewer extends Archive */ public void actionPerformed (ActionEvent e) { - log.info(e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info(e.getActionCommand()); // if (e.getSource() == updateArchive) cmd_updateArchive(); @@ -340,7 +340,7 @@ public class ArchiveViewer extends Archive bNext.setEnabled(m_index < m_archives.length-1); updateArchive.setEnabled(false); // - log.info("Index=" + m_index + ", Length=" + m_archives.length); + if (log.isLoggable(Level.INFO)) log.info("Index=" + m_index + ", Length=" + m_archives.length); if (m_archives.length == 0) { positionInfo.setText("No Record Found"); @@ -403,7 +403,7 @@ public class ArchiveViewer extends Archive ar.setHelp(helpField.getText()); update = true; } - log.info("Update=" + update); + if (log.isLoggable(Level.INFO)) log.info("Update=" + update); if (update) ar.saveEx(); // diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java index 14331cac38..2ecfdee2f4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/FormFrame.java @@ -319,7 +319,7 @@ public class FormFrame extends CFrame protected boolean openForm (int AD_Form_ID, String className, String name, GridTab gridTab) { - log.info("AD_Form_ID=" + AD_Form_ID + " - Class=" + className); + if (log.isLoggable(Level.INFO)) log.info("AD_Form_ID=" + AD_Form_ID + " - Class=" + className); Properties ctx = Env.getCtx(); Env.setContext(ctx, m_WindowNo, "WindowName", name); setTitle(Env.getHeader(ctx, m_WindowNo)); @@ -389,7 +389,7 @@ public class FormFrame extends CFrame { if (busy == m_glassPane.isVisible()) return; - log.info("Busy=" + busy); + if (log.isLoggable(Level.INFO)) log.info("Busy=" + busy); if (busy) setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); else diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAttributeGrid.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAttributeGrid.java index 2ab2d9ab3c..bb61969e6d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VAttributeGrid.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VAttributeGrid.java @@ -337,7 +337,7 @@ public class VAttributeGrid extends CPanel if (xValues != null) { cols = xValues.length + 1; - log.info("X - " + m_attributes[indexAttr1-1].getName() + " #" + xValues.length); + if (log.isLoggable(Level.INFO)) log.info("X - " + m_attributes[indexAttr1-1].getName() + " #" + xValues.length); } // y dimension @@ -348,7 +348,7 @@ public class VAttributeGrid extends CPanel if (yValues != null) { rows = yValues.length + 1; - log.info("Y - " + m_attributes[indexAttr2-1].getName() + " #" + yValues.length); + if (log.isLoggable(Level.INFO)) log.info("Y - " + m_attributes[indexAttr2-1].getName() + " #" + yValues.length); } // @@ -357,7 +357,7 @@ public class VAttributeGrid extends CPanel gridPanel.add(modePanel, BorderLayout.NORTH); gridPanel.add(new CScrollPane(grid), BorderLayout.CENTER); // - log.info("Rows=" + rows + " - Cols=" + cols); + if (log.isLoggable(Level.INFO)) log.info("Rows=" + rows + " - Cols=" + cols); for (int row = 0; row < rows; row++) { for (int col = 0; col < cols; col++) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VCharge.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VCharge.java index 20e10226b3..2d0237a842 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VCharge.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VCharge.java @@ -168,7 +168,7 @@ public class VCharge extends Charge */ public void actionPerformed (ActionEvent e) { - log.info(e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info(e.getActionCommand()); // if (e.getActionCommand().equals(ConfirmPanel.A_OK) || m_C_Element_ID == 0) dispose(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java index f00abd1c66..8080eb44ad 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VGenPanel.java @@ -184,7 +184,7 @@ public class VGenPanel extends CPanel implements ActionListener, ChangeListener, */ public void actionPerformed (ActionEvent e) { - log.info("Cmd=" + e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info("Cmd=" + e.getActionCommand()); // if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) { diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VInOutGen.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VInOutGen.java index 7b116e1a2a..de00776f53 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VInOutGen.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VInOutGen.java @@ -216,7 +216,7 @@ public class VInOutGen extends InOutGen implements FormPanel, ActionListener, Ve */ public void vetoableChange(PropertyChangeEvent e) { - log.info(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.INFO)) log.info(e.getPropertyName() + "=" + e.getNewValue()); if (e.getPropertyName().equals("M_Warehouse_ID")) setM_Warehouse_ID(e.getNewValue()); if (e.getPropertyName().equals("C_BPartner_ID")) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VInvoiceGen.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VInvoiceGen.java index bef0833ef6..fbb40e0279 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VInvoiceGen.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VInvoiceGen.java @@ -198,7 +198,7 @@ public class VInvoiceGen extends InvoiceGen implements FormPanel, ActionListener */ public void vetoableChange(PropertyChangeEvent e) { - log.info(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.INFO)) log.info(e.getPropertyName() + "=" + e.getNewValue()); if (e.getPropertyName().equals("AD_Org_ID")) m_AD_Org_ID = e.getNewValue(); if (e.getPropertyName().equals("C_BPartner_ID")) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java index ab5b929113..72d8cfd12e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VMatch.java @@ -75,7 +75,7 @@ public class VMatch extends Match { m_WindowNo = WindowNo; m_frame = frame; - log.info("WinNo=" + m_WindowNo + if (log.isLoggable(Level.INFO)) log.info("WinNo=" + m_WindowNo + " - AD_Client_ID=" + m_AD_Client_ID + ", AD_Org_ID=" + m_AD_Org_ID + ", By=" + m_by); Env.setContext(Env.getCtx(), m_WindowNo, "IsSOTrx", "N"); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VMerge.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VMerge.java index 6d805c791e..83f4b6592f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VMerge.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VMerge.java @@ -68,7 +68,7 @@ public class VMerge extends Merge implements FormPanel, ActionListener { m_WindowNo = WindowNo; m_frame = frame; - log.info( "VMerge.init - WinNo=" + m_WindowNo); + if (log.isLoggable(Level.INFO)) log.info( "VMerge.init - WinNo=" + m_WindowNo); try { preInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java index 7476d0e531..43e4d1d043 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VPayPrint.java @@ -303,7 +303,7 @@ public class VPayPrint extends PayPrint implements FormPanel, ActionListener, Ve return; String PaymentRule = pp.getValue(); - log.info("PaymentRule=" + PaymentRule); + if (log.isLoggable(Level.INFO)) log.info("PaymentRule=" + PaymentRule); fNoPayments.setText(" "); String msg = loadPaymentRuleInfo(m_C_PaySelection_ID, PaymentRule); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VResetPassword.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VResetPassword.java index 75112740ed..2348e37059 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VResetPassword.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VResetPassword.java @@ -195,7 +195,7 @@ public class VResetPassword implements FormPanel, ActionListener, VetoableChange @Override public void vetoableChange(PropertyChangeEvent e) throws PropertyVetoException { - log.info(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.INFO)) log.info(e.getPropertyName() + "=" + e.getNewValue()); if (e.getPropertyName().equals("AD_User_ID")) fUser.setValue(e.getNewValue()); } diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java index 6b58e98127..31fdc58873 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeBOM.java @@ -228,7 +228,7 @@ public class VTreeBOM extends CPanel implements FormPanel, ActionListener, TreeS { m_WindowNo = WindowNo; m_frame = frame; - log.info( "VTreeBOM.init - WinNo=" + m_WindowNo); + if (log.isLoggable(Level.INFO)) log.info( "VTreeBOM.init - WinNo=" + m_WindowNo); try { preInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java index e1db2efddc..b3738aa3a8 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/form/VTreeMaintenance.java @@ -87,7 +87,7 @@ public class VTreeMaintenance extends TreeMaintenance { m_WindowNo = WindowNo; m_frame = frame; - log.info( "VMerge.init - WinNo=" + m_WindowNo); + if (log.isLoggable(Level.INFO)) log.info( "VMerge.init - WinNo=" + m_WindowNo); try { preInit(); @@ -188,7 +188,7 @@ public class VTreeMaintenance extends TreeMaintenance private void action_loadTree() { KeyNamePair tree = (KeyNamePair)treeField.getSelectedItem(); - log.info("Tree=" + tree); + if (log.isLoggable(Level.INFO)) log.info("Tree=" + tree); if (tree.getKey() <= 0) { centerList.setModel(new DefaultListModel()); @@ -232,7 +232,7 @@ public class VTreeMaintenance extends TreeMaintenance catch (Exception ex) { } - log.info("Selected=" + selected); + if (log.isLoggable(Level.INFO)) log.info("Selected=" + selected); if (selected != null) // allow add if not in tree bAdd.setEnabled(!centerTree.setSelectedNode(selected.id)); } // valueChanged @@ -246,7 +246,7 @@ public class VTreeMaintenance extends TreeMaintenance MTreeNode tn = (MTreeNode)e.getNewValue(); if (tn == null) return; - log.info(tn.toString()); + if (log.isLoggable(Level.INFO)) log.info(tn.toString()); ListModel model = centerList.getModel(); int size = model.getSize(); int index = -1; @@ -265,7 +265,7 @@ public class VTreeMaintenance extends TreeMaintenance */ private void action_treeAdd(ListItem item) { - log.info("Item=" + item); + if (log.isLoggable(Level.INFO)) log.info("Item=" + item); if (item != null) { centerTree.nodeChanged(true, item.id, item.name, @@ -282,7 +282,7 @@ public class VTreeMaintenance extends TreeMaintenance */ private void action_treeDelete(ListItem item) { - log.info("Item=" + item); + if (log.isLoggable(Level.INFO)) log.info("Item=" + item); if (item != null) { centerTree.nodeChanged(false, item.id, item.name, diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java index fd6c6f257b..b0034abed2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Find.java @@ -803,7 +803,7 @@ public final class Find extends CDialog */ public void actionPerformed (ActionEvent e) { - log.info(e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info(e.getActionCommand()); // if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) cmd_cancel(); @@ -1584,7 +1584,7 @@ public final class Find extends CDialog log.warning("Query - over max"); } else - log.info("Query=" + m_query); + if (log.isLoggable(Level.INFO)) log.info("Query=" + m_query); return m_query; } // getQuery diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java index b1b613d248..7e671a277b 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/Info.java @@ -292,7 +292,7 @@ public abstract class Info extends CDialog boolean multiSelection, String whereClause, boolean lookup) { super (frame, modal); - log.info("WinNo=" + p_WindowNo + " " + whereClause); + if (log.isLoggable(Level.INFO)) log.info("WinNo=" + p_WindowNo + " " + whereClause); p_WindowNo = WindowNo; p_tableName = tableName; p_keyColumn = keyColumn; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java index eb6a8fa6aa..068af00995 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoAsset.java @@ -82,7 +82,7 @@ public class InfoAsset extends Info boolean multiSelection, String whereClause, boolean lookup) { super (frame, modal, WindowNo, "a", "A_Asset_ID", multiSelection, whereClause); - log.info(value + ", ID=" + A_Asset_ID + ", WHERE=" + whereClause); + if (log.isLoggable(Level.INFO)) log.info(value + ", ID=" + A_Asset_ID + ", WHERE=" + whereClause); setTitle(Msg.getMsg(Env.getCtx(), "InfoAsset")); // statInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java index 3234446dcc..3f0f7d8b41 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoGeneral.java @@ -95,7 +95,7 @@ public class InfoGeneral extends Info boolean multiSelection, String whereClause, boolean lookup) { super (frame, modal, WindowNo, tableName, keyColumn, multiSelection, whereClause, lookup); - log.info(tableName + " - " + keyColumn + " - " + whereClause); + if (log.isLoggable(Level.INFO)) log.info(tableName + " - " + keyColumn + " - " + whereClause); setTitle(Msg.getMsg(Env.getCtx(), "Info")); // statInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java index a1bee735f3..1fba267726 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoProduct.java @@ -118,7 +118,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener boolean multiSelection, String whereClause, boolean lookup) { super (frame, modal, WindowNo, "p", "M_Product_ID", multiSelection, whereClause, lookup); - log.info(value + ", Wh=" + M_Warehouse_ID + ", PL=" + M_PriceList_ID + ", WHERE=" + whereClause); + if (log.isLoggable(Level.INFO)) log.info(value + ", Wh=" + M_Warehouse_ID + ", PL=" + M_PriceList_ID + ", WHERE=" + whereClause); setTitle(Msg.getMsg(Env.getCtx(), "InfoProduct")); // statInit(); @@ -1049,7 +1049,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener */ protected void zoom() { - log.info(""); + if (log.isLoggable(Level.INFO)) log.info(""); Integer M_Product_ID = getSelectedRowKey(); if (M_Product_ID == null) return; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java index 49fc991a6e..4ff9ab4ef7 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/InfoSchedule.java @@ -83,7 +83,7 @@ public class InfoSchedule extends CDialog else m_mAssignment = mAssignment; if (mAssignment != null) - log.info(mAssignment.toString()); + if (log.isLoggable(Level.INFO)) log.info(mAssignment.toString()); m_dateFrom = m_mAssignment.getAssignDateFrom(); if (m_dateFrom == null) m_dateFrom = new Timestamp(System.currentTimeMillis()); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java b/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java index d1d77ee2e7..12cbeb8cc3 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/search/PAttributeInstance.java @@ -102,7 +102,7 @@ public class PAttributeInstance extends CDialog */ private void init (int M_Warehouse_ID, int M_Locator_ID, int M_Product_ID, int C_BPartner_ID) { - log.info("M_Warehouse_ID=" + M_Warehouse_ID + if (log.isLoggable(Level.INFO)) log.info("M_Warehouse_ID=" + M_Warehouse_ID + ", M_Locator_ID=" + M_Locator_ID + ", M_Product_ID=" + M_Product_ID); m_M_Warehouse_ID = M_Warehouse_ID; diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java index 4088a5c67d..cfa0b15fec 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFActivity.java @@ -672,7 +672,7 @@ public class WFActivity extends CPanel MQuery query = MQuery.getEqualQuery(ColumnName, Record_ID); boolean IsSOTrx = m_activity.isSOTrx(); // - log.info("Zoom to AD_Window_ID=" + AD_Window_ID + if (log.isLoggable(Level.INFO)) log.info("Zoom to AD_Window_ID=" + AD_Window_ID + " - " + query + " (IsSOTrx=" + IsSOTrx + ")"); AWindow frame = new AWindow(null); if (!frame.initWindow(AD_Window_ID, query)) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java index 2ae5d94245..49d7a468b7 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPanel.java @@ -113,7 +113,7 @@ public class WFPanel extends CPanel m_readWrite = (menu == null); m_WF_whereClause = wfWhereClause; m_WF_Window_ID = wfWindow_ID; - log.info("RW=" + m_readWrite); + if (log.isLoggable(Level.INFO)) log.info("RW=" + m_readWrite); try { jbInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java index 6725dab422..77d6fab24d 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/wf/WFPopupItem.java @@ -1,5 +1,7 @@ package org.compiere.apps.wf; +import java.util.logging.Level; + import javax.swing.JMenuItem; import org.compiere.util.CLogger; @@ -61,20 +63,20 @@ public class WFPopupItem extends JMenuItem { MWFNodeNext newLine = new MWFNodeNext(m_node, m_AD_WF_NodeTo_ID); newLine.setClientOrg(AD_Client_ID, 0); newLine.saveEx(); - log.info("Add Line to " + m_node + " -> " + newLine); + if (log.isLoggable(Level.INFO)) log.info("Add Line to " + m_node + " -> " + newLine); wfp.load(m_AD_Workflow_ID, true); } // Delete Node else if (m_node != null && m_AD_WF_NodeTo_ID == -1) { - log.info("Delete Node: " + m_node); + if (log.isLoggable(Level.INFO)) log.info("Delete Node: " + m_node); m_node.delete(false); wfp.load(m_AD_Workflow_ID, true); } // Delete Line else if (m_line != null) { - log.info("Delete Line: " + m_line); + if (log.isLoggable(Level.INFO)) log.info("Delete Line: " + m_line); m_line.delete(false); wfp.load(m_AD_Workflow_ID, true); } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java index f3c48d964e..0c93c29e83 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/RecordAccessDialog.java @@ -68,7 +68,7 @@ public class RecordAccessDialog extends CDialog public RecordAccessDialog(JFrame owner, int AD_Table_ID, int Record_ID) { super(owner, Msg.translate(Env.getCtx(), "RecordAccessDialog")); - log.info("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); + if (log.isLoggable(Level.INFO)) log.info("AD_Table_ID=" + AD_Table_ID + ", Record_ID=" + Record_ID); m_AD_Table_ID = AD_Table_ID; m_Record_ID = Record_ID; try diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java index 492a144c60..e4cf0ccaf2 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromDepositBatchUI.java @@ -63,7 +63,7 @@ public class VCreateFromDepositBatchUI extends CreateFromDepositBatch implements public VCreateFromDepositBatchUI(GridTab mTab) { super(mTab); - log.info(getGridTab().toString()); + if (log.isLoggable(Level.INFO)) log.info(getGridTab().toString()); dialog = new VCreateFromDialog(this, getGridTab().getWindowNo(), true); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java index 5a5624dc11..2781f44093 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromInvoiceUI.java @@ -51,7 +51,7 @@ public class VCreateFromInvoiceUI extends CreateFromInvoice implements ActionLis public VCreateFromInvoiceUI(GridTab mTab) { super(mTab); - log.info(getGridTab().toString()); + if (log.isLoggable(Level.INFO)) log.info(getGridTab().toString()); dialog = new VCreateFromDialog(this, getGridTab().getWindowNo(), true); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromPackageShipmentUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromPackageShipmentUI.java index 668f26fdb0..e36356b4cc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromPackageShipmentUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromPackageShipmentUI.java @@ -37,7 +37,7 @@ public class VCreateFromPackageShipmentUI extends CreateFromPackageShipment public VCreateFromPackageShipmentUI(GridTab mTab) { super(mTab); - log.info(mTab.toString()); + if (log.isLoggable(Level.INFO)) log.info(mTab.toString()); dialog = new VCreateFromDialog(this, getGridTab().getWindowNo(), true); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java index 63b1a5e642..b41b3b642c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromRMAUI.java @@ -45,7 +45,7 @@ public class VCreateFromRMAUI extends CreateFromRMA implements VetoableChangeLis public VCreateFromRMAUI(GridTab mTab) { super(mTab); - log.info(getGridTab().toString()); + if (log.isLoggable(Level.INFO)) log.info(getGridTab().toString()); dialog = new VCreateFromDialog(this, getGridTab().getWindowNo(), true); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java index c5abd1e0f9..77ff6f78c9 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromShipmentUI.java @@ -68,7 +68,7 @@ public class VCreateFromShipmentUI extends CreateFromShipment implements ActionL public VCreateFromShipmentUI(GridTab mTab) { super(mTab); - log.info(getGridTab().toString()); + if (log.isLoggable(Level.INFO)) log.info(getGridTab().toString()); dialog = new VCreateFromDialog(this, getGridTab().getWindowNo(), true); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java index 1486f81772..252df438b0 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromStatementUI.java @@ -63,7 +63,7 @@ public class VCreateFromStatementUI extends CreateFromStatement implements Actio public VCreateFromStatementUI(GridTab mTab) { super(mTab); - log.info(getGridTab().toString()); + if (log.isLoggable(Level.INFO)) log.info(getGridTab().toString()); dialog = new VCreateFromDialog(this, getGridTab().getWindowNo(), true); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java index 6862b66710..7000a12fc4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VTabbedPane.java @@ -241,7 +241,7 @@ public class VTabbedPane extends CTabbedPane boolean display = Evaluator.evaluateLogic(gc, logic); if (!display) { - log.info("Not displayed - " + logic); + if (log.isLoggable(Level.INFO)) log.info("Not displayed - " + logic); return false; } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java index fb50538fa1..23a8e8d108 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/Calendar.java @@ -95,7 +95,7 @@ public class Calendar extends CDialog public Calendar (Frame frame, String title, Timestamp startTS, int displayType) { super (frame, title, true); - log.info(startTS==null ? "null" : startTS.toString() + " - DT=" + displayType); + if (log.isLoggable(Level.INFO)) log.info(startTS==null ? "null" : startTS.toString() + " - DT=" + displayType); m_displayType = displayType; // try diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java index b10d4444ac..05a244ad7f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/MDocNumber.java @@ -233,7 +233,7 @@ public final class MDocNumber extends PlainDocument } catch (ParseException pe) { - log.info("InvalidEntry - " + pe.getMessage()); + if (log.isLoggable(Level.INFO)) log.info("InvalidEntry - " + pe.getMessage()); } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java index 51cbe4d7fa..5a35537ad4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VAccount.java @@ -354,7 +354,7 @@ public final class VAccount extends JComponent m_cmdTextRunning = true; String text = m_text.getText(); - log.info("Text=" + text); + if (log.isLoggable(Level.INFO)) log.info("Text=" + text); if (text == null || text.length() == 0 || text.equals("%")) { cmd_button(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java index ca3fd24384..0b703221dc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBPartner.java @@ -77,7 +77,7 @@ public final class VBPartner extends CDialog implements ActionListener m_readOnly = !MRole.getDefault().canUpdate( Env.getAD_Client_ID(Env.getCtx()), Env.getAD_Org_ID(Env.getCtx()), MBPartner.Table_ID, 0, false); - log.info("R/O=" + m_readOnly); + if (log.isLoggable(Level.INFO)) log.info("R/O=" + m_readOnly); try { jbInit(); diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java index ec41e2b2ab..2284c3351c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VBinary.java @@ -193,7 +193,7 @@ public class VBinary extends JButton */ public void propertyChange(PropertyChangeEvent evt) { - log.info(evt.toString()); + if (log.isLoggable(Level.INFO)) log.info(evt.toString()); if (evt.getPropertyName().equals(org.compiere.model.GridField.PROPERTY)) setValue(evt.getNewValue()); } // propertyChange @@ -219,7 +219,7 @@ public class VBinary extends JButton if (file == null) return; // - log.info(file.toString()); + if (log.isLoggable(Level.INFO)) log.info(file.toString()); try { if (save) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImageDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImageDialog.java index 1c2827b600..e4f3828e20 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImageDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VImageDialog.java @@ -69,7 +69,7 @@ public class VImageDialog extends CDialog public VImageDialog (Frame owner, MImage mImage) { super (owner, Msg.translate(Env.getCtx(), "AD_Image_ID"), true); - log.info("MImage=" + mImage); + if (log.isLoggable(Level.INFO)) log.info("MImage=" + mImage); m_mImage = mImage; try { diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java index b87ab704d9..19dfd3e6cc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VLookup.java @@ -671,7 +671,7 @@ public class VLookup extends JComponent { if (value instanceof Integer && m_lookup.getDisplayType() != DisplayType.ID) // for IDs is ok to be out of the list { - log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL"); + if (log.isLoggable(Level.INFO)) log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL"); actionCombo (null); // data binding (calls setValue again) m_value = null; } @@ -783,7 +783,7 @@ public class VLookup extends JComponent // don't allow selection of inactive if (s.startsWith(MLookup.INACTIVE_S) && s.endsWith(MLookup.INACTIVE_E)) { - log.info(m_columnName + " - selection inactive set to NULL"); + if (log.isLoggable(Level.INFO)) log.info(m_columnName + " - selection inactive set to NULL"); value = null; } } @@ -1456,7 +1456,7 @@ public class VLookup extends JComponent int AD_Window_ID = m_lookup.getZoom(zoomQuery); // - log.info(m_columnName + " - AD_Window_ID=" + AD_Window_ID + if (log.isLoggable(Level.INFO)) log.info(m_columnName + " - AD_Window_ID=" + AD_Window_ID + " - Query=" + zoomQuery + " - Value=" + value); // setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -1498,7 +1498,7 @@ public class VLookup extends JComponent setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); // Object obj = m_combo.getSelectedItem(); - log.info(m_columnName + " #" + m_lookup.getSize() + ", Selected=" + obj); + if (log.isLoggable(Level.INFO)) log.info(m_columnName + " #" + m_lookup.getSize() + ", Selected=" + obj); //no need to refresh readonly lookup, just remove direct cache if (!isReadWrite()) { @@ -1518,7 +1518,7 @@ public class VLookup extends JComponent } // setCursor(Cursor.getDefaultCursor()); - log.info(m_columnName + " #" + m_lookup.getSize() + ", Selected=" + m_combo.getSelectedItem()); + if (log.isLoggable(Level.INFO)) log.info(m_columnName + " #" + m_lookup.getSize() + ", Selected=" + m_combo.getSelectedItem()); } // actionRefresh diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java index 0cbf2298bd..c7669b2a22 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VNumber.java @@ -728,7 +728,7 @@ public final class VNumber extends JComponent } catch (ParseException pe) { - log.info("InvalidEntry - " + pe.getMessage()); + if (log.isLoggable(Level.INFO)) log.info("InvalidEntry - " + pe.getMessage()); } // Find frame diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java index 2979634158..d05c407dab 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPAttributeDialog.java @@ -681,7 +681,7 @@ public class VPAttributeDialog extends CDialog M_Lot_ID = pp.getKey(); MQuery zoomQuery = new MQuery("M_Lot"); zoomQuery.addRestriction("M_Lot_ID", MQuery.EQUAL, M_Lot_ID); - log.info(zoomQuery.toString()); + if (log.isLoggable(Level.INFO)) log.info(zoomQuery.toString()); // setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); // diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java index 00b50fc2b4..fa92befc8e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/ed/VPaymentEditor.java @@ -303,7 +303,7 @@ public class VPaymentEditor extends JComponent implements VEditor, ActionListene { if (value instanceof Integer && m_lookup.getDisplayType() != DisplayType.ID) // for IDs is ok to be out of the list { - log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL"); + if (log.isLoggable(Level.INFO)) log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL"); actionCombo (null); // data binding (calls setValue again) m_value = null; } @@ -363,7 +363,7 @@ public class VPaymentEditor extends JComponent implements VEditor, ActionListene // don't allow selection of inactive if (s.startsWith(MLookup.INACTIVE_S) && s.endsWith(MLookup.INACTIVE_E)) { - log.info(m_columnName + " - selection inactive set to NULL"); + if (log.isLoggable(Level.INFO)) log.info(m_columnName + " - selection inactive set to NULL"); value = null; } } diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java b/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java index ad420c07d7..3a08f126fd 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/tree/VTreePanel.java @@ -682,7 +682,7 @@ public final class VTreePanel extends CPanel } return true; } - log.info("Node not found; ID=" + nodeID); + if (log.isLoggable(Level.INFO)) log.info("Node not found; ID=" + nodeID); return false; } // selectID @@ -1018,7 +1018,7 @@ public final class VTreePanel extends CPanel private void setBusy (boolean busy) { JFrame frame = AEnv.getFrame(this); - log.info("frame: " + frame); + if (log.isLoggable(Level.INFO)) log.info("frame: " + frame); if (frame == null) // during init return; if (busy) diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java b/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java index 5de8930b67..2f6332f46e 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/CashSubFunctions.java @@ -25,6 +25,7 @@ import java.awt.event.InputMethodListener; import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Properties; +import java.util.logging.Level; import javax.swing.border.TitledBorder; @@ -339,7 +340,7 @@ public class CashSubFunctions extends PosQuery implements ActionListener, InputM String action = e.getActionCommand(); if (action == null || action.length() == 0) return; - log.info("PosCashSubFunctions - actionPerformed: " + action); + if (log.isLoggable(Level.INFO)) log.info("PosCashSubFunctions - actionPerformed: " + action); // to display panel with initial change if (action.equals("displayInitialChange")) diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/POSKeyboard.java b/org.adempiere.ui.swing/src/org/compiere/pos/POSKeyboard.java index b47e943fea..c037f55903 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/POSKeyboard.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/POSKeyboard.java @@ -159,7 +159,7 @@ public class POSKeyboard extends CDialog implements ActionListener, PosKeyListen } dispose(); } - log.info( "PosSubBasicKeys - actionPerformed: " + action); + if (log.isLoggable(Level.INFO)) log.info( "PosSubBasicKeys - actionPerformed: " + action); } // actionPerformed diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java b/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java index c6bb008bc4..87e4dc7029 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/PosBasePanel.java @@ -126,7 +126,7 @@ public class PosBasePanel extends CPanel } m_SalesRep_ID = Env.getAD_User_ID(m_ctx); - log.info("init - SalesRep_ID=" + m_SalesRep_ID); + if (log.isLoggable(Level.INFO)) log.info("init - SalesRep_ID=" + m_SalesRep_ID); m_WindowNo = WindowNo; m_frame = frame; frame.setJMenuBar(null); diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java b/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java index 7103a28fbf..941ee286bd 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/PosKeyPanel.java @@ -222,7 +222,7 @@ public class PosKeyPanel extends CPanel implements ActionListener { String action = e.getActionCommand(); if (action == null || action.length() == 0 || keymap == null) return; - log.info( "PosSubFunctionKeys - actionPerformed: " + action); + if (log.isLoggable(Level.INFO)) log.info( "PosSubFunctionKeys - actionPerformed: " + action); HashMap currentKeymap = keymap.get(currentLayout); try diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/PosOrderModel.java b/org.adempiere.ui.swing/src/org/compiere/pos/PosOrderModel.java index f9bbc941fd..4c601281da 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/PosOrderModel.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/PosOrderModel.java @@ -103,7 +103,7 @@ public class PosOrderModel extends MOrder { } else { - log.info("SubCurrentLine.getOrder -" + partner); + if (log.isLoggable(Level.INFO)) log.info("SubCurrentLine.getOrder -" + partner); super.setBPartner(partner); MOrderLine[] lineas = getLines(); for (int i = 0; i < lineas.length; i++) diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/QueryBPartner.java b/org.adempiere.ui.swing/src/org/compiere/pos/QueryBPartner.java index 605d89f4bf..759e0a20ac 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/QueryBPartner.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/QueryBPartner.java @@ -186,7 +186,7 @@ public class QueryBPartner extends PosQuery */ public void actionPerformed (ActionEvent e) { - log.info(e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info(e.getActionCommand()); if ("Refresh".equals(e.getActionCommand()) || e.getSource() == f_value // || e.getSource() == f_upc || e.getSource() == f_name // || e.getSource() == f_sku diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/QueryProduct.java b/org.adempiere.ui.swing/src/org/compiere/pos/QueryProduct.java index 673b8f7ab3..50f2f95520 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/QueryProduct.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/QueryProduct.java @@ -195,7 +195,7 @@ public class QueryProduct extends PosQuery */ public void actionPerformed (ActionEvent e) { - log.info(e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info(e.getActionCommand()); if ("Refresh".equals(e.getActionCommand()) || e.getSource() == f_value || e.getSource() == f_upc || e.getSource() == f_name || e.getSource() == f_sku) diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/QueryTicket.java b/org.adempiere.ui.swing/src/org/compiere/pos/QueryTicket.java index b7657ff2f2..266698e243 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/QueryTicket.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/QueryTicket.java @@ -22,6 +22,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; +import java.util.logging.Level; import javax.swing.KeyStroke; import javax.swing.border.TitledBorder; @@ -168,7 +169,7 @@ public class QueryTicket extends PosQuery @Override public void actionPerformed (ActionEvent e) { - log.info("PosQueryProduct.actionPerformed - " + e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info("PosQueryProduct.actionPerformed - " + e.getActionCommand()); if ("Refresh".equals(e.getActionCommand()) || e.getSource() == f_processed || e.getSource() == f_documentno || e.getSource() == f_date) @@ -281,7 +282,7 @@ public class QueryTicket extends PosQuery f_ok.setEnabled(enabled); - log.info("ID=" + m_c_order_id); + if (log.isLoggable(Level.INFO)) log.info("ID=" + m_c_order_id); } // enableButtons /** @@ -291,7 +292,7 @@ public class QueryTicket extends PosQuery @Override protected void close() { - log.info("C_Order_ID=" + m_c_order_id); + if (log.isLoggable(Level.INFO)) log.info("C_Order_ID=" + m_c_order_id); if (m_c_order_id > 0) { diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java b/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java index c918bb8a7d..137424279c 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/SubCheckout.java @@ -19,6 +19,7 @@ import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.logging.Level; import javax.swing.border.TitledBorder; @@ -199,7 +200,7 @@ public class SubCheckout extends PosSubPanel implements ActionListener String action = e.getActionCommand(); if (action == null || action.length() == 0) return; - log.info( "PosSubCheckout - actionPerformed: " + action); + if (log.isLoggable(Level.INFO)) log.info( "PosSubCheckout - actionPerformed: " + action); if (action.equals("Summary")) diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java b/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java index 77e2333e7c..c1264376cd 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/SubCurrentLine.java @@ -234,7 +234,7 @@ public class SubCurrentLine extends PosSubPanel implements ActionListener, Focus String action = e.getActionCommand(); if (action == null || action.length() == 0) return; - log.info( "SubCurrentLine - actionPerformed: " + action); + if (log.isLoggable(Level.INFO)) log.info( "SubCurrentLine - actionPerformed: " + action); // Plus if (action.equals("Plus")) diff --git a/org.adempiere.ui.swing/src/org/compiere/pos/SubOrder.java b/org.adempiere.ui.swing/src/org/compiere/pos/SubOrder.java index 175001b3f2..19dc73c1bc 100644 --- a/org.adempiere.ui.swing/src/org/compiere/pos/SubOrder.java +++ b/org.adempiere.ui.swing/src/org/compiere/pos/SubOrder.java @@ -245,7 +245,7 @@ public class SubOrder extends PosSubPanel String action = e.getActionCommand(); if (action == null || action.length() == 0) return; - log.info( "PosSubCustomer - actionPerformed: " + action); + if (log.isLoggable(Level.INFO)) log.info( "PosSubCustomer - actionPerformed: " + action); // New if (action.equals("New")) { @@ -333,7 +333,7 @@ public class SubOrder extends PosSubPanel { if (e.isTemporary()) return; - log.info(e.toString()); + if (log.isLoggable(Level.INFO)) log.info(e.toString()); findBPartner(); } // focusLost diff --git a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java index 3df0345101..c3fdef7188 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/Viewer.java @@ -817,7 +817,7 @@ public class Viewer extends CFrame private void mouse_clicked (MouseEvent e, boolean rightClick) { Point point = e.getPoint(); - log.info("Right=" + rightClick + " - " + point.toString()); + if (log.isLoggable(Level.INFO)) log.info("Right=" + rightClick + " - " + point.toString()); if (rightClick) { m_ddQ = m_viewPanel.getDrillDown(point); @@ -854,7 +854,7 @@ public class Viewer extends CFrame MQuery query = m_viewPanel.getDrillDown(point); if (query != null) { - log.info("Drill Down: " + query.getWhereClause(true)); + if (log.isLoggable(Level.INFO)) log.info("Drill Down: " + query.getWhereClause(true)); executeDrill(query); } } @@ -865,7 +865,7 @@ public class Viewer extends CFrame { NamePair pp = (NamePair)comboDrill.getSelectedItem(); query.setTableName(pp.getID()); - log.info("Drill Accross: " + query.getWhereClause(true)); + if (log.isLoggable(Level.INFO)) log.info("Drill Accross: " + query.getWhereClause(true)); executeDrill(query); } } diff --git a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java index caa13391cc..74e12370de 100755 --- a/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java +++ b/org.adempiere.ui.swing/src/org/eevolution/form/VInOutInvoiceGen.java @@ -421,7 +421,7 @@ public class VInOutInvoiceGen extends CPanel */ public void actionPerformed (ActionEvent e) { - log.info("Cmd=" + e.getActionCommand()); + if (log.isLoggable(Level.INFO)) log.info("Cmd=" + e.getActionCommand()); // if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) { @@ -453,7 +453,7 @@ public class VInOutInvoiceGen extends CPanel */ public void vetoableChange(PropertyChangeEvent e) { - log.info(e.getPropertyName() + "=" + e.getNewValue()); + if (log.isLoggable(Level.INFO)) log.info(e.getPropertyName() + "=" + e.getNewValue()); if (e.getPropertyName().equals("M_Warehouse_ID")) m_M_Warehouse_ID = e.getNewValue(); if (e.getPropertyName().equals("C_BPartner_ID")) @@ -527,7 +527,7 @@ public class VInOutInvoiceGen extends CPanel */ private void generateShipments () { - log.info("M_Warehouse_ID=" + m_M_Warehouse_ID); + if (log.isLoggable(Level.INFO)) log.info("M_Warehouse_ID=" + m_M_Warehouse_ID); String trxName = Trx.createTrxName("IOG"); Trx trx = Trx.get(trxName, true); //trx needs to be committed too //String trxName = null; diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java index 5f702354ee..ff3e38e18d 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java @@ -77,7 +77,7 @@ public class Allocation { m_C_Currency_ID = Env.getContextAsInt(Env.getCtx(), "$C_Currency_ID"); // default // - log.info("Currency=" + m_C_Currency_ID); + if (log.isLoggable(Level.INFO)) log.info("Currency=" + m_C_Currency_ID); m_AD_Org_ID = Env.getAD_Org_ID(Env.getCtx()); } diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Archive.java b/org.adempiere.ui/src/org/compiere/apps/form/Archive.java index 3545663392..0c6a4fc747 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Archive.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Archive.java @@ -215,6 +215,6 @@ public class Archive { //metas: Bugfix zu included_Role ende // m_archives = MArchive.get(Env.getCtx(), sql.toString()); - log.info("Length=" + m_archives.length); + if (log.isLoggable(Level.INFO)) log.info("Length=" + m_archives.length); } // cmd_query } diff --git a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java index 59515c9a46..ec6da5e135 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/InOutGen.java @@ -258,7 +258,7 @@ public class InOutGen extends GenForm public String generate(IStatusBar statusBar, KeyNamePair docTypeKNPair, String docActionSelected) { String info = ""; - log.info("M_Warehouse_ID=" + m_M_Warehouse_ID); + if (log.isLoggable(Level.INFO)) log.info("M_Warehouse_ID=" + m_M_Warehouse_ID); String trxName = Trx.createTrxName("IOG"); Trx trx = Trx.get(trxName, true); //trx needs to be committed too diff --git a/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java b/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java index 111e8a95cf..ef6d26f6f4 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/TrxMaterial.java @@ -93,7 +93,7 @@ public class TrxMaterial { // DateTO if (movementDateTo != null) query.addRestriction("TRUNC(MovementDate)", MQuery.LESS_EQUAL, movementDateTo); - log.info( "VTrxMaterial.refresh query=" + query.toString()); + if (log.isLoggable(Level.INFO)) log.info( "VTrxMaterial.refresh query=" + query.toString()); /** * Refresh/Requery diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java index 74e25bb0f2..bac88f2052 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromDepositBatch.java @@ -41,7 +41,7 @@ public abstract class CreateFromDepositBatch extends CreateFromBatch public CreateFromDepositBatch(GridTab mTab) { super(mTab); - log.info(mTab.toString()); + if (log.isLoggable(Level.INFO)) log.info(mTab.toString()); } public boolean dynInit() throws Exception diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java index a24fec9819..0d50ec7e9a 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromInvoice.java @@ -63,7 +63,7 @@ public abstract class CreateFromInvoice extends CreateFrom public CreateFromInvoice(GridTab mTab) { super(mTab); - log.info(mTab.toString()); + if (log.isLoggable(Level.INFO)) log.info(mTab.toString()); } // VCreateFromInvoice /** diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java index 812a45de9a..9bf821fb3b 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromPackageShipment.java @@ -44,7 +44,7 @@ public abstract class CreateFromPackageShipment extends CreateFrom public CreateFromPackageShipment(GridTab gridTab) { super(gridTab); - log.info(gridTab.toString()); + if (log.isLoggable(Level.INFO)) log.info(gridTab.toString()); } public boolean dynInit() throws Exception diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java index a2f1769922..4e7296b462 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromRMA.java @@ -41,7 +41,7 @@ public abstract class CreateFromRMA extends CreateFrom { public CreateFromRMA(GridTab mTab) { super(mTab); - log.info(mTab.toString()); + if (log.isLoggable(Level.INFO)) log.info(mTab.toString()); } @Override diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java index 966c4b1734..d38cca72fd 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromShipment.java @@ -67,7 +67,7 @@ public abstract class CreateFromShipment extends CreateFrom public CreateFromShipment(GridTab mTab) { super(mTab); - log.info(mTab.toString()); + if (log.isLoggable(Level.INFO)) log.info(mTab.toString()); } // VCreateFromShipment /** diff --git a/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java b/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java index 3d9aba336c..2f1d2bdad1 100644 --- a/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java +++ b/org.adempiere.ui/src/org/compiere/grid/CreateFromStatement.java @@ -41,7 +41,7 @@ public abstract class CreateFromStatement extends CreateFromBatch public CreateFromStatement(GridTab mTab) { super(mTab); - log.info(mTab.toString()); + if (log.isLoggable(Level.INFO)) log.info(mTab.toString()); } public boolean dynInit() throws Exception diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java index 16055d66c2..8c6cdc0780 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCheck.java @@ -157,10 +157,9 @@ public abstract class PaymentFormCheck extends PaymentForm { m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); m_mPaymentOriginal.saveEx(); - if (ok) - log.info( "Payment Cancelled - " + m_mPaymentOriginal); - else - { + if (ok) { + if (log.isLoggable(Level.INFO)) log.info( "Payment Cancelled - " + m_mPaymentOriginal); + } else { processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); throw new AdempiereException(processMsg); } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java index 0d5c194095..056a54c89f 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormCreditCard.java @@ -241,10 +241,9 @@ public abstract class PaymentFormCreditCard extends PaymentForm { m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); m_mPaymentOriginal.saveEx(); - if (ok) - log.info( "Payment Cancelled - " + m_mPaymentOriginal); - else - { + if (ok) { + if (log.isLoggable(Level.INFO)) log.info( "Payment Cancelled - " + m_mPaymentOriginal); + } else { processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); throw new AdempiereException(processMsg); } diff --git a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java index 581ee96fb8..209b96670e 100644 --- a/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java +++ b/org.adempiere.ui/src/org/compiere/grid/PaymentFormDirect.java @@ -147,10 +147,9 @@ public abstract class PaymentFormDirect extends PaymentForm { m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); boolean ok = m_mPaymentOriginal.processIt(DocAction.ACTION_Reverse_Correct); m_mPaymentOriginal.saveEx(); - if (ok) - log.info( "Payment Cancelled - " + m_mPaymentOriginal); - else - { + if (ok) { + if (log.isLoggable(Level.INFO)) log.info( "Payment Cancelled - " + m_mPaymentOriginal); + } else { processMsg = Msg.getMsg(Env.getCtx(), "PaymentNotCancelled") + " " + m_mPaymentOriginal.getDocumentNo(); throw new AdempiereException(processMsg); } diff --git a/org.adempiere.ui/src/org/compiere/install/Translation.java b/org.adempiere.ui/src/org/compiere/install/Translation.java index 816da01b43..e8bdd4ce2b 100644 --- a/org.adempiere.ui/src/org/compiere/install/Translation.java +++ b/org.adempiere.ui/src/org/compiere/install/Translation.java @@ -128,7 +128,7 @@ public class Translation // factory.setValidating(true); SAXParser parser = factory.newSAXParser(); parser.parse(in, handler); - log.info("Updated=" + handler.getUpdateCount()); + if (log.isLoggable(Level.INFO)) log.info("Updated=" + handler.getUpdateCount()); MLanguage lang = MLanguage.get(m_ctx, AD_Language); if (! lang.isLoginLocale()) { lang.setIsLoginLocale(true); @@ -247,7 +247,7 @@ public class Translation root.appendChild(row); rows++; } - log.info("Records=" + rows + if (log.isLoggable(Level.INFO)) log.info("Records=" + rows + ", DTD=" + document.getDoctype() + " - " + Trl_Table); // @@ -411,7 +411,7 @@ public class Translation } // Validate Translation - log.info("Start Validating ... " + language); + if (log.isLoggable(Level.INFO)) log.info("Start Validating ... " + language); language.maintain(true); return ""; } // validateLanguage diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java index 3a948668ea..293e61efe4 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AdvertisementServlet.java @@ -18,6 +18,7 @@ package org.compiere.wstore; import java.io.IOException; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.ServletConfig; import javax.servlet.ServletException; @@ -97,7 +98,7 @@ public class AdvertisementServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to request.jsp"); + if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to request.jsp"); if (!response.isCommitted ()) response.sendRedirect("advertisements.jsp"); } // doGet @@ -114,7 +115,7 @@ public class AdvertisementServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); // Get Session attributes HttpSession session = request.getSession(true); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java index f2f504c8b5..9b29896aa0 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/AssetServlet.java @@ -106,7 +106,7 @@ public class AssetServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(false); // @@ -133,7 +133,7 @@ public class AssetServlet extends HttpServlet return; } - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/BasketServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/BasketServlet.java index b6ea42d624..cf086ff438 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/BasketServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/BasketServlet.java @@ -103,7 +103,7 @@ public class BasketServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr() + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - " + request.getRequestURL()); @SuppressWarnings("unused") Properties ctx = JSPEnv.getCtx(request); @@ -137,10 +137,10 @@ public class BasketServlet extends HttpServlet // Do we add? Add_x addLine (request, pl, wb); - log.info(wb.toString()); + if (log.isLoggable(Level.INFO)) log.info(wb.toString()); // Go back to basket String url = "/basket.jsp"; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutServlet.java index 4e206e46f7..63893547d0 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/CheckOutServlet.java @@ -17,6 +17,7 @@ package org.compiere.wstore; import java.io.IOException; +import java.util.logging.Level; import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; @@ -96,7 +97,7 @@ public class CheckOutServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); HttpSession session = request.getSession(true); session.removeAttribute(WebSessionCtx.HDR_MESSAGE); @@ -117,7 +118,7 @@ public class CheckOutServlet extends HttpServlet // if (request.isSecure()) // { - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); // } @@ -141,7 +142,7 @@ public class CheckOutServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); @SuppressWarnings("unused") HttpSession session = request.getSession(false); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/Counter.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/Counter.java index ee493a96e7..6a3ad9c0bf 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/Counter.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/Counter.java @@ -138,7 +138,7 @@ public class Counter extends HttpServlet implements Runnable String ref = request.getHeader("referer"); if (ref == null || ref.length() == 0) ref = request.getRequestURL().toString(); - log.info("Referer=" + request.getHeader("referer") + " - URL=" + request.getRequestURL()); + if (log.isLoggable(Level.INFO)) log.info("Referer=" + request.getHeader("referer") + " - URL=" + request.getRequestURL()); } // run } // Counter diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/EMailServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/EMailServlet.java index eb32637d01..ac0dfafc7f 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/EMailServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/EMailServlet.java @@ -18,6 +18,7 @@ package org.compiere.wstore; import java.io.IOException; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; @@ -94,7 +95,7 @@ public class EMailServlet extends HttpServlet public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doPost (request, response); } // doGet @@ -109,7 +110,7 @@ public class EMailServlet extends HttpServlet public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(true); session.removeAttribute(WebSessionCtx.HDR_MESSAGE); @@ -129,7 +130,7 @@ public class EMailServlet extends HttpServlet } url = "/" + url; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ExpenseServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ExpenseServlet.java index aaa20b3191..d63596340f 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ExpenseServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ExpenseServlet.java @@ -18,6 +18,7 @@ package org.compiere.wstore; import java.io.IOException; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.ServletConfig; import javax.servlet.ServletException; @@ -98,7 +99,7 @@ public class ExpenseServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to request.jsp"); + if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to request.jsp"); if (!response.isCommitted ()) response.sendRedirect("expenses.jsp"); } // doGet @@ -117,7 +118,7 @@ public class ExpenseServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); // Get Session attributes HttpSession session = request.getSession(true); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoServlet.java index 21d15cd401..06adccf5cf 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InfoServlet.java @@ -96,7 +96,7 @@ public class InfoServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); HttpSession session = request.getSession(true); session.removeAttribute(WebSessionCtx.HDR_MESSAGE); // WEnv.dump(session); @@ -106,7 +106,7 @@ public class InfoServlet extends HttpServlet boolean success = processParameter(request); String url = "/info.jsp"; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet @@ -122,7 +122,7 @@ public class InfoServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doGet (request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java index c945417593..b9ae5eb270 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/InvoiceServlet.java @@ -103,7 +103,7 @@ public class InvoiceServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); String url = "/invoices.jsp"; // @@ -126,7 +126,7 @@ public class InvoiceServlet extends HttpServlet info.setMessage(msg); } - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet @@ -142,7 +142,7 @@ public class InvoiceServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doGet (request, response); } // doPost @@ -200,12 +200,11 @@ public class InvoiceServlet extends HttpServlet // Check if Invoice already created String fileName = invoice.getPDFFileName (dirName); File file = new File(fileName); - if (file.exists() && file.isFile() && file.length() > MIN_SIZE) - log.info("Existing: " + file - + " - " + new Timestamp(file.lastModified())); - else - { - log.info("New: " + fileName); + if (file.exists() && file.isFile() && file.length() > MIN_SIZE) { + if (log.isLoggable(Level.INFO)) log.info("Existing: " + file + + " - " + new Timestamp(file.lastModified())); + } else { + if (log.isLoggable(Level.INFO)) log.info("New: " + fileName); file = invoice.createPDF (file); if (file != null) { diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java index 438b64ff29..27a64751f4 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/IssueReportServlet.java @@ -76,7 +76,7 @@ public class IssueReportServlet extends HttpServlet */ public void destroy() { - log.info(""); + if (log.isLoggable(Level.INFO)) log.info(""); } // destroy @@ -92,7 +92,7 @@ public class IssueReportServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); @SuppressWarnings("unused") HttpSession session = request.getSession(true); @@ -167,7 +167,7 @@ public class IssueReportServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doGet(request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationServlet.java index ef0d009614..2bf06f040f 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LocationServlet.java @@ -19,6 +19,7 @@ package org.compiere.wstore; import java.io.IOException; import java.io.PrintWriter; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.ServletConfig; import javax.servlet.ServletException; @@ -91,7 +92,7 @@ public class LocationServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doPost(request, response); } // doGet @@ -106,7 +107,7 @@ public class LocationServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); @SuppressWarnings("unused") HttpSession session = request.getSession(true); Properties ctx = JSPEnv.getCtx(request); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginServlet.java index 3bc9650a69..7700d9d0fa 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/LoginServlet.java @@ -100,7 +100,7 @@ public class LoginServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); HttpSession session = request.getSession(true); // create new session.removeAttribute(WebSessionCtx.HDR_MESSAGE); // @@ -121,7 +121,7 @@ public class LoginServlet extends HttpServlet if (!url.startsWith("/")) url = "/" + url; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); return; @@ -138,7 +138,7 @@ public class LoginServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(true); session.removeAttribute(WebSessionCtx.HDR_MESSAGE); @@ -209,7 +209,7 @@ public class LoginServlet extends HttpServlet if (!url.startsWith("/")) url = "/" + url; - log.info("doPost - Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info("doPost - Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url); dispatcher.forward(request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java index 597af8f094..5f5fd239ed 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/NoteServlet.java @@ -102,7 +102,7 @@ public class NoteServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); String url = "/notes.jsp"; // HttpSession session = request.getSession(false); @@ -124,7 +124,7 @@ public class NoteServlet extends HttpServlet info.setMessage(msg); } - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet @@ -150,7 +150,7 @@ public class NoteServlet extends HttpServlet log.fine("No index)"); return "No Request Attachment index"; } - log.info("AD_Notice_ID=" + AD_Note_ID + " / " + attachmentIndex); + if (log.isLoggable(Level.INFO)) log.info("AD_Notice_ID=" + AD_Note_ID + " / " + attachmentIndex); // Get Note Properties ctx = JSPEnv.getCtx(request); @@ -194,7 +194,7 @@ public class NoteServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); String url = "/notes.jsp"; // Get Session attributes @@ -227,7 +227,7 @@ public class NoteServlet extends HttpServlet } // Redisplay - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java index 47e69809e3..94a3a4c619 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/OrderServlet.java @@ -107,7 +107,7 @@ public class OrderServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doPost (request, response); } // doGet @@ -122,7 +122,7 @@ public class OrderServlet extends HttpServlet public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(true); session.removeAttribute(WebSessionCtx.HDR_MESSAGE); @@ -200,7 +200,7 @@ public class OrderServlet extends HttpServlet } } - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java index 1e851dcdad..b96c94bef9 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/PaymentServlet.java @@ -103,7 +103,7 @@ public class PaymentServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(true); session.removeAttribute(WebSessionCtx.HDR_MESSAGE); @@ -115,9 +115,9 @@ public class PaymentServlet extends HttpServlet MPayment p = (MPayment)session.getAttribute (ATTR_PAYMENT); if (wu == null) { - log.info ("No User"); + if (log.isLoggable(Level.INFO)) log.info ("No User"); String url = "/index.jsp"; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } @@ -128,7 +128,7 @@ public class PaymentServlet extends HttpServlet String amtParam = WebUtil.getParameter (request, "Amt"); if (amtParam == null || amtParam.length() == 0) { - log.info ("No Payment Amount (" + amtParam + ")"); + if (log.isLoggable(Level.INFO)) log.info ("No Payment Amount (" + amtParam + ")"); doPost (request, response); return; } @@ -165,7 +165,7 @@ public class PaymentServlet extends HttpServlet // Need to be positive amount if (amt == null || amt.compareTo(Env.ZERO) < 0) { - log.info("No valid Payment Amount (" + amtParam + ") - " + amt); + if (log.isLoggable(Level.INFO)) log.info("No valid Payment Amount (" + amtParam + ") - " + amt); doPost (request, response); return; } @@ -181,7 +181,7 @@ public class PaymentServlet extends HttpServlet { log.warning("Parsing C_Invoice_ID=" + invoiceParam + " - " + ex.toString()); } - log.info("Amt=" + amt + ", C_Invoice_ID=" + C_Invoice_ID); + if (log.isLoggable(Level.INFO)) log.info("Amt=" + amt + ", C_Invoice_ID=" + C_Invoice_ID); // Create New Payment for Amt & optional Invoice // see OrderServlet.createPayment @@ -204,7 +204,7 @@ public class PaymentServlet extends HttpServlet session.setAttribute (ATTR_PAYMENT, p); String url = "/paymentInfo.jsp"; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet @@ -221,7 +221,7 @@ public class PaymentServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("Post from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(true); // WEnv.dump(session); @@ -240,7 +240,7 @@ public class PaymentServlet extends HttpServlet else url = "/paymentInfo.jsp"; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductServlet.java index 0ff169c004..0bac7b5c6a 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/ProductServlet.java @@ -18,6 +18,7 @@ package org.compiere.wstore; import java.io.IOException; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; @@ -93,7 +94,7 @@ public class ProductServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(true); @@ -117,7 +118,7 @@ public class ProductServlet extends HttpServlet // Forward String url = "/index.jsp"; - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doPost @@ -136,7 +137,7 @@ public class ProductServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doPost (request, response); } // doGet diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RegistrationServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RegistrationServlet.java index 36b0e9eba3..1c5996f562 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RegistrationServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RegistrationServlet.java @@ -107,7 +107,7 @@ public class RegistrationServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); if (!processSystemRegistration(request, response)) { log.info("Forward to registration.jsp"); @@ -132,7 +132,7 @@ public class RegistrationServlet extends HttpServlet // Not a System registration if ((name == null || name.length() == 0)&& (userName == null || userName.length() == 0) && (password == null || password.length() == 0)) return false; - log.info ("Name=" + name + ", User=" + userName); + if (log.isLoggable(Level.INFO)) log.info ("Name=" + name + ", User=" + userName); // Registration Info String description = WebUtil.getParameter (request, "Description"); boolean inProduction = WebUtil.getParameterAsBoolean(request, "IsInProduction", "Y"); @@ -241,7 +241,7 @@ public class RegistrationServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); // Get Session attributes HttpSession session = request.getSession(true); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java index ffb3424c4a..d9b8af435c 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RequestServlet.java @@ -120,7 +120,7 @@ public class RequestServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); String url = "/requestDetails.jsp"; // HttpSession session = request.getSession(false); @@ -142,7 +142,7 @@ public class RequestServlet extends HttpServlet info.setMessage(msg); } - log.info ("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet @@ -168,7 +168,7 @@ public class RequestServlet extends HttpServlet log.fine("No index)"); return "No Request Attachment index"; } - log.info("R_Request_ID=" + R_Request_ID + " / " + attachmentIndex); + if (log.isLoggable(Level.INFO)) log.info("R_Request_ID=" + R_Request_ID + " / " + attachmentIndex); // Get Request Properties ctx = JSPEnv.getCtx(request); @@ -218,7 +218,7 @@ public class RequestServlet extends HttpServlet throws ServletException, IOException { String contentType = request.getContentType(); - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr() + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - " + contentType); // Get Session attributes diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java index f798d141b7..85bea4f42d 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/RfQServlet.java @@ -105,7 +105,7 @@ public class RfQServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("doGet from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("doGet from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); String url = "/rfqs.jsp"; // HttpSession session = request.getSession(false); @@ -127,7 +127,7 @@ public class RfQServlet extends HttpServlet info.setMessage(msg); } - log.info ("doGet - Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("doGet - Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet @@ -208,7 +208,7 @@ public class RfQServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); // Log.setTraceLevel(9); // WebEnv.dump(request); // WebEnv.dump(request.getSession()); @@ -244,7 +244,7 @@ public class RfQServlet extends HttpServlet session.setAttribute(WebSessionCtx.HDR_MESSAGE, msg); String url = "/rfqDetails.jsp?C_RfQ_ID=" + C_RfQ_ID; // - log.info ("doGet - Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("doGet - Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/SearchServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/SearchServlet.java index 262a2c2166..48fd9ae0aa 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/SearchServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/SearchServlet.java @@ -22,6 +22,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.ServletConfig; import javax.servlet.ServletException; @@ -97,7 +98,7 @@ public class SearchServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doPost(request, response); } // doGet @@ -112,7 +113,7 @@ public class SearchServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); @SuppressWarnings("unused") HttpSession session = request.getSession(true); Properties ctx = JSPEnv.getCtx(request); diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/SingleItem.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/SingleItem.java index 86f7ff702f..fc7b6ddfa6 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/SingleItem.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/SingleItem.java @@ -17,6 +17,7 @@ package org.compiere.wstore; import java.io.IOException; +import java.util.logging.Level; import javax.servlet.ServletConfig; import javax.servlet.ServletException; @@ -85,7 +86,7 @@ public class SingleItem extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); } // doGet @@ -99,7 +100,7 @@ public class SingleItem extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); } // doPost } // SingleItem diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/StoreFilter.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/StoreFilter.java index 4280c06523..cf12a3fb49 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/StoreFilter.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/StoreFilter.java @@ -55,7 +55,7 @@ public class StoreFilter implements javax.servlet.Filter WebEnv.initWeb(config.getServletContext()); if (log == null) log = CLogger.getCLogger(StoreFilter.class); - log.info(config.getFilterName()); + if (log.isLoggable(Level.INFO)) log.info(config.getFilterName()); } // init /** diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/UpdateServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/UpdateServlet.java index a9da8af599..42e97a3cc6 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/UpdateServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/UpdateServlet.java @@ -18,6 +18,7 @@ package org.compiere.wstore; import java.io.IOException; import java.util.Properties; +import java.util.logging.Level; import javax.servlet.RequestDispatcher; import javax.servlet.ServletConfig; @@ -108,7 +109,7 @@ public class UpdateServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); @SuppressWarnings("unused") HttpSession session = request.getSession(true); // ignore GET @@ -125,7 +126,7 @@ public class UpdateServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("From " + request.getRemoteHost() + " - " + request.getRemoteAddr()); Properties ctx = JSPEnv.getCtx(request); HttpSession session = request.getSession(true); session.removeAttribute(WebSessionCtx.HDR_MESSAGE); @@ -158,7 +159,7 @@ public class UpdateServlet if (!url.startsWith("/")) url = "/" + url; - log.info("Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info("Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url); dispatcher.forward(request, response); } // doPost diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java index d7b53df857..24f47625b9 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WebOrder.java @@ -126,7 +126,7 @@ public class WebOrder // log.info("-------------------------------------- " + wu.isCustomer()); } BigDecimal amt = m_order.getGrandTotal(); - log.info("Amt=" + amt); + if (log.isLoggable(Level.INFO)) log.info("Amt=" + amt); return ok; } // createOrder diff --git a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java index dae0d9811e..9d8f7d7882 100644 --- a/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java +++ b/org.adempiere.webstore.servlet/src/org/compiere/wstore/WorkflowServlet.java @@ -103,7 +103,7 @@ public class WorkflowServlet extends HttpServlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("doGet from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to notes.jsp"); + if (log.isLoggable(Level.INFO)) log.info("doGet from " + request.getRemoteHost() + " - " + request.getRemoteAddr() + " - forward to notes.jsp"); String url = "/notes.jsp"; // HttpSession session = request.getSession(false); @@ -125,7 +125,7 @@ public class WorkflowServlet extends HttpServlet info.setMessage(msg); } - log.info ("doGet - Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("doGet - Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doGet @@ -151,7 +151,7 @@ public class WorkflowServlet extends HttpServlet log.fine("streamAttachment - no index)"); return "No Request Attachment index"; } - log.info("streamAttachment - AD_WF_Activity_ID=" + AD_WF_Activity_ID + " / " + attachmentIndex); + if (log.isLoggable(Level.INFO)) log.info("streamAttachment - AD_WF_Activity_ID=" + AD_WF_Activity_ID + " / " + attachmentIndex); // Get Note Properties ctx = JSPEnv.getCtx(request); @@ -196,7 +196,7 @@ public class WorkflowServlet extends HttpServlet public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - log.info("doPost from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); + if (log.isLoggable(Level.INFO)) log.info("doPost from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); String url = "/notes.jsp"; // // Log.setTraceLevel(9); @@ -257,7 +257,7 @@ public class WorkflowServlet extends HttpServlet } } - log.info ("doGet - Forward to " + url); + if (log.isLoggable(Level.INFO)) log.info ("doGet - Forward to " + url); RequestDispatcher dispatcher = getServletContext().getRequestDispatcher (url); dispatcher.forward (request, response); } // doPost diff --git a/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java b/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java index b26ec4aba4..d7b8e8c678 100644 --- a/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java +++ b/org.compiere.db.oracle.provider/src/org/adempiere/db/oracle/config/ConfigOracle.java @@ -316,7 +316,7 @@ public class ConfigOracle implements IDatabaseConfig if (monitor != null) monitor.update(new DBConfigStatus(DBConfigStatus.DATABASE_SERVER, "ErrorDatabaseServer", pass, true, error)); - log.info("OK: Database Server = " + databaseServer); + if (log.isLoggable(Level.INFO)) log.info("OK: Database Server = " + databaseServer); data.setProperty(ConfigurationData.ADEMPIERE_DB_SERVER, databaseServer!=null ? databaseServer.getHostName() : null); //store as lower case for better script level backward compatibility data.setProperty(ConfigurationData.ADEMPIERE_DB_TYPE, data.getDatabaseType()); @@ -331,7 +331,7 @@ public class ConfigOracle implements IDatabaseConfig pass, true, error)); if (!pass) return error; - log.info("OK: Database Port = " + databasePort); + if (log.isLoggable(Level.INFO)) log.info("OK: Database Port = " + databasePort); data.setProperty(ConfigurationData.ADEMPIERE_DB_PORT, String.valueOf(databasePort)); boolean isDBExists = data.getDatabaseExists(); @@ -363,9 +363,9 @@ public class ConfigOracle implements IDatabaseConfig pass, true, error)); if (!pass) return error; - log.info("OK: Connection = " + url); + if (log.isLoggable(Level.INFO)) log.info("OK: Connection = " + url); data.setProperty(ConfigurationData.ADEMPIERE_DB_URL, url); - log.info("OK: Database System User " + databaseName); + if (log.isLoggable(Level.INFO)) log.info("OK: Database System User " + databaseName); data.setProperty(ConfigurationData.ADEMPIERE_DB_NAME, databaseName); data.setProperty(ConfigurationData.ADEMPIERE_DB_SYSTEM, systemPassword); @@ -388,7 +388,7 @@ public class ConfigOracle implements IDatabaseConfig pass, true, error)); if (pass) { - log.info("OK: Database User = " + databaseUser); + if (log.isLoggable(Level.INFO)) log.info("OK: Database User = " + databaseUser); if (m_con != null) data.setProperty(ConfigurationData.ADEMPIERE_WEBSTORES, data.getWebStores(m_con)); } @@ -441,12 +441,14 @@ public class ConfigOracle implements IDatabaseConfig { url = "jdbc:oracle:oci8:@" + databaseName; pass = testJDBC(url, "system", systemPassword); - if (pass) - log.info("OK: Connection = " + url); - else + if (pass) { + if (log.isLoggable(Level.INFO)) log.info("OK: Connection = " + url); + } else { log.warning("Cannot connect via Net8: " + url); - } else + } + } else { log.info("OCI Test Skipped"); + } // m_con = null; diff --git a/org.compiere.db.postgresql.provider/src/org/adempiere/db/postgresql/config/ConfigPostgreSQL.java b/org.compiere.db.postgresql.provider/src/org/adempiere/db/postgresql/config/ConfigPostgreSQL.java index 04ec2eca1a..313651388d 100755 --- a/org.compiere.db.postgresql.provider/src/org/adempiere/db/postgresql/config/ConfigPostgreSQL.java +++ b/org.compiere.db.postgresql.provider/src/org/adempiere/db/postgresql/config/ConfigPostgreSQL.java @@ -16,6 +16,7 @@ package org.adempiere.db.postgresql.config; import java.net.InetAddress; import java.sql.Connection; +import java.util.logging.Level; import org.adempiere.install.DBConfigStatus; import org.adempiere.install.IDBConfigMonitor; @@ -100,7 +101,7 @@ public class ConfigPostgreSQL implements IDatabaseConfig if (monitor != null) monitor.update(new DBConfigStatus(DBConfigStatus.DATABASE_SERVER, "ErrorDatabaseServer", pass, true, error)); - log.info("OK: Database Server = " + databaseServer); + if (log.isLoggable(Level.INFO)) log.info("OK: Database Server = " + databaseServer); data.setProperty(ConfigurationData.ADEMPIERE_DB_SERVER, databaseServer!=null ? databaseServer.getHostName() : null); //store as lower case for better script level backward compatibility data.setProperty(ConfigurationData.ADEMPIERE_DB_TYPE, data.getDatabaseType()); @@ -115,7 +116,7 @@ public class ConfigPostgreSQL implements IDatabaseConfig pass, true, error)); if (!pass) return error; - log.info("OK: Database Port = " + databasePort); + if (log.isLoggable(Level.INFO)) log.info("OK: Database Port = " + databasePort); data.setProperty(ConfigurationData.ADEMPIERE_DB_PORT, String.valueOf(databasePort)); boolean isDBExists = data.getDatabaseExists(); @@ -139,7 +140,7 @@ public class ConfigPostgreSQL implements IDatabaseConfig return error; } } - log.info("OK: System Connection = " + urlSystem); + if (log.isLoggable(Level.INFO)) log.info("OK: System Connection = " + urlSystem); data.setProperty(ConfigurationData.ADEMPIERE_DB_SYSTEM, systemPassword); @@ -157,7 +158,7 @@ public class ConfigPostgreSQL implements IDatabaseConfig pass, true, error)); if (pass) { - log.info("OK: Database User = " + databaseUser); + if (log.isLoggable(Level.INFO)) log.info("OK: Database User = " + databaseUser); } else { diff --git a/org.idempiere.felix.webconsole/src/org/idempiere/felix/webconsole/SecurityProviderImpl.java b/org.idempiere.felix.webconsole/src/org/idempiere/felix/webconsole/SecurityProviderImpl.java index 45b4345b6c..1bfedfbecf 100644 --- a/org.idempiere.felix.webconsole/src/org/idempiere/felix/webconsole/SecurityProviderImpl.java +++ b/org.idempiere.felix.webconsole/src/org/idempiere/felix/webconsole/SecurityProviderImpl.java @@ -3,6 +3,8 @@ */ package org.idempiere.felix.webconsole; +import java.util.logging.Level; + import org.apache.felix.webconsole.WebConsoleSecurityProvider; import org.compiere.model.MUser; import org.compiere.util.CLogger; @@ -33,7 +35,7 @@ public class SecurityProviderImpl implements WebConsoleSecurityProvider { log.warning ("Not a Sys Admin = " + username); return null; } - log.info ("Name=" + username); + if (log.isLoggable(Level.INFO)) log.info ("Name=" + username); return Boolean.TRUE; } diff --git a/org.idempiere.fitnesse.fixture/src/org/idempiere/fitnesse/fixture/Service.java b/org.idempiere.fitnesse.fixture/src/org/idempiere/fitnesse/fixture/Service.java index 154f5e6119..7aaeb5ef5e 100644 --- a/org.idempiere.fitnesse.fixture/src/org/idempiere/fitnesse/fixture/Service.java +++ b/org.idempiere.fitnesse.fixture/src/org/idempiere/fitnesse/fixture/Service.java @@ -33,6 +33,7 @@ import java.sql.Timestamp; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Properties; +import java.util.logging.Level; import org.compiere.model.MUser; import org.compiere.util.CLogger; @@ -317,7 +318,7 @@ public class Service { SimpleDateFormat dateFormat4Timestamp = new SimpleDateFormat( dateFormatOnlyForCtx ); Env.setContext( getCtx(), "#Date", dateFormat4Timestamp.format(ts)+" 00:00:00" ); // JDBC format - log.info(" #Date = "+ Env.getContextAsDate( getCtx(), "#Date")); + if (log.isLoggable(Level.INFO)) log.info(" #Date = "+ Env.getContextAsDate( getCtx(), "#Date")); Env.setContext( getCtx(), "#M_Warehouse_ID", AD_Warehouse_ID ); Env.setContext(getCtx(), Env.LANGUAGE, m_lang.getAD_Language()); diff --git a/org.idempiere.fitrecorder/src/org/idempiere/fitrecorder/FitRecorder.java b/org.idempiere.fitrecorder/src/org/idempiere/fitrecorder/FitRecorder.java index 5ad2643341..d254a6f497 100644 --- a/org.idempiere.fitrecorder/src/org/idempiere/fitrecorder/FitRecorder.java +++ b/org.idempiere.fitrecorder/src/org/idempiere/fitrecorder/FitRecorder.java @@ -28,6 +28,7 @@ import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.logging.Level; import org.compiere.model.MClient; import org.compiere.model.MColumn; @@ -125,7 +126,7 @@ public class FitRecorder implements ModelValidator { engine.addModelChange(rs.getString(1), this); } } catch(Exception e) { - log.info(e.getLocalizedMessage()); + if (log.isLoggable(Level.INFO)) log.info(e.getLocalizedMessage()); } finally { DB.close(rs, pstmt); pstmt = null; rs = null; @@ -146,13 +147,13 @@ public class FitRecorder implements ModelValidator { engine.addDocValidate(rs.getString(1), this); } } catch (Exception e) { - log.info(e.getLocalizedMessage()); + if (log.isLoggable(Level.INFO)) log.info(e.getLocalizedMessage()); } finally { DB.close(rs, pstmt); pstmt = null; rs = null; } } catch (Exception e) { - log.info(e.getLocalizedMessage()); + if (log.isLoggable(Level.INFO)) log.info(e.getLocalizedMessage()); } } @@ -477,7 +478,7 @@ public class FitRecorder implements ModelValidator { writer.flush(); } } catch (Exception e) { - log.info(e.getLocalizedMessage()); + if (log.isLoggable(Level.INFO)) log.info(e.getLocalizedMessage()); } return null; } diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportInfo.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportInfo.java index 49b6511552..68e79e0ef3 100644 --- a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportInfo.java +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportInfo.java @@ -157,7 +157,7 @@ public class ReportInfo } catch (JRException e) { - log.info("ReportInfo.compileReport- "+ e); + if (log.isLoggable(Level.INFO)) log.info("ReportInfo.compileReport- "+ e); this.errorMsg.add("ReportInfo.compileReport- " + e.getMessage()); this.hasError = true; } @@ -230,7 +230,7 @@ public class ReportInfo rs = null; pstmt = null; } - log.info("Get ReportDefinition-" + this.toString()); + if (log.isLoggable(Level.INFO)) log.info("Get ReportDefinition-" + this.toString()); } protected boolean isDirty() diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java index 3af79be9bb..ff52acdd99 100644 --- a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportPool.java @@ -24,6 +24,7 @@ package net.sf.compilo.report; import java.util.HashMap; import java.util.Iterator; import java.util.Set; +import java.util.logging.Level; import org.compiere.util.CLogger; @@ -88,7 +89,7 @@ public class ReportPool if (it.hasNext()) { Integer key = it.next(); - log.info("Remove " + key + " from the report pool"); + if (log.isLoggable(Level.INFO)) log.info("Remove " + key + " from the report pool"); pool.remove(key); } size--; @@ -97,7 +98,7 @@ public class ReportPool pool.put(new Integer(AD_Process_ID), reportinfo); size++; } - log.info("Load " + reportinfo + " into Report Pool" + " Size=" + size); + if (log.isLoggable(Level.INFO)) log.info("Load " + reportinfo + " into Report Pool" + " Size=" + size); } } diff --git a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java index 2e8d7f6ff9..3dcc4121ba 100644 --- a/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java +++ b/org.idempiere.webservices/WEB-INF/src/net/sf/compilo/report/ReportProcessor.java @@ -28,6 +28,7 @@ import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.Properties; +import java.util.logging.Level; import net.sf.compilo.data.CompiereDataSourceFactory; import net.sf.compilo.data.compiereDataSource; @@ -68,7 +69,7 @@ public class ReportProcessor if(!REPORT_HOME.exists()) log.saveError("The Report_Home not exists", REPORT_HOME.getAbsolutePath()); - log.info("Set REPORT_HOME to " + REPORT_HOME.getAbsolutePath()); + if (log.isLoggable(Level.INFO)) log.info("Set REPORT_HOME to " + REPORT_HOME.getAbsolutePath()); } public ReportProcessor (Properties ctx, ProcessInfo pi) diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java index 59a0fbaed9..f49600d4ac 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java @@ -18,6 +18,7 @@ import java.sql.Timestamp; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Properties; +import java.util.logging.Level; import org.adempiere.util.ServerContext; import org.compiere.model.MUser; @@ -292,7 +293,7 @@ public class CompiereService { SimpleDateFormat dateFormat4Timestamp = new SimpleDateFormat( dateFormatOnlyForCtx ); Env.setContext( getCtx(), "#Date", dateFormat4Timestamp.format(ts)+" 00:00:00" ); // JDBC format - log.info(" #Date = "+ Env.getContextAsDate( getCtx(), "#Date")); + if (log.isLoggable(Level.INFO)) log.info(" #Date = "+ Env.getContextAsDate( getCtx(), "#Date")); Env.setContext( getCtx(), "#M_Warehouse_ID", M_Warehouse_ID ); Env.setContext(m_ctx, Env.LANGUAGE, m_language.getAD_Language()); diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java index f5ec02791f..882153681d 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java @@ -928,7 +928,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic sqlParaList.add(Env.getAD_Client_ID(Env.getCtx())); String sql = sqlBuilder.toString(); - log.info("Web service type " + m_webservicetype.getValue() + "SQL to check existing record " + sql); + if (log.isLoggable(Level.INFO)) log.info("Web service type " + m_webservicetype.getValue() + "SQL to check existing record " + sql); try { record_id = DB.getSQLValueEx(trxName, sql, sqlParaList); } catch (Exception e) { diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java index c421708295..06831762e8 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/Process.java @@ -670,7 +670,7 @@ public class Process { static public ReportEngine start (ProcessInfo pi) { - log.info("start - " + pi); + if (log.isLoggable(Level.INFO)) log.info("start - " + pi); /** * Order Print