diff --git a/vcell-cli/src/main/java/org/vcell/cli/biosimulation/BiosimulationsCommand.java b/vcell-cli/src/main/java/org/vcell/cli/biosimulation/BiosimulationsCommand.java index 70d41883b2..2fe2689701 100644 --- a/vcell-cli/src/main/java/org/vcell/cli/biosimulation/BiosimulationsCommand.java +++ b/vcell-cli/src/main/java/org/vcell/cli/biosimulation/BiosimulationsCommand.java @@ -82,7 +82,9 @@ public static int executeVCellBiosimulationsMode(File inFile, File outDir, boole } LoggerContext config = (LoggerContext)(LogManager.getContext(false)); config.getConfiguration().getLoggerConfig(LogManager.getLogger("org.vcell").getName()).setLevel(logLevel); - config.getConfiguration().getLoggerConfig(LogManager.getLogger("cbit").getName()).setLevel(logLevel); + + config.getConfiguration().getLoggerConfig(LogManager.getLogger("cbit").getName()).setLevel(!bDebug ? Level.WARN : logLevel); + config.getConfiguration().getLoggerConfig(LogManager.getLogger("org.jlibsedml").getName()).setLevel(!bDebug ? Level.WARN : logLevel); config.updateLoggers(); logger.debug("Biosimulations mode requested"); diff --git a/vcell-core/src/main/java/cbit/vcell/geometry/surface/GeometrySurfaceUtils.java b/vcell-core/src/main/java/cbit/vcell/geometry/surface/GeometrySurfaceUtils.java index 34b4e7aa4c..823135f90c 100644 --- a/vcell-core/src/main/java/cbit/vcell/geometry/surface/GeometrySurfaceUtils.java +++ b/vcell-core/src/main/java/cbit/vcell/geometry/surface/GeometrySurfaceUtils.java @@ -85,7 +85,7 @@ public static GeometricRegion[] getUpdatedGeometricRegions(GeometrySurfaceDescri cbit.vcell.geometry.RegionImage.RegionInfo regionInfos[] = regionImage.getRegionInfos(); for(int i = 0; i < regionInfos.length; i++){ cbit.vcell.geometry.RegionImage.RegionInfo regionInfo = regionInfos[i]; - if (lg.isDebugEnabled()) lg.info(regionInfo); + lg.info(regionInfo); cbit.vcell.geometry.SubVolume subVolume = geometrySpec.getSubVolume(regionInfo.getPixelValue()); String name = subVolume.getName() + regionInfo.getRegionIndex(); int numPixels = regionInfo.getNumPixels(); @@ -214,7 +214,7 @@ public static GeometricRegion[] getUpdatedGeometricRegions(GeometrySurfaceDescri } size -= sizeOfPixel * 0.125 * numOctantsToRemove; - if(lg.isDebugEnabled()) lg.info("size={}", size); + lg.debug("size={}", size); break; } @@ -222,7 +222,7 @@ public static GeometricRegion[] getUpdatedGeometricRegions(GeometrySurfaceDescri VolumeGeometricRegion volumeRegion = new VolumeGeometricRegion(name, size, volumeUnit, subVolume, regionInfo.getRegionIndex()); regionList.add(volumeRegion); - if(lg.isDebugEnabled()) lg.info("added volumeRegion({})", volumeRegion.getName()); + lg.info("added volumeRegion({})", volumeRegion.getName()); } // @@ -266,7 +266,7 @@ public static GeometricRegion[] getUpdatedGeometricRegions(GeometrySurfaceDescri } surfaceRegion.addAdjacentGeometricRegion(interiorVolumeRegion); interiorVolumeRegion.addAdjacentGeometricRegion(surfaceRegion); - if(lg.isDebugEnabled()) lg.info("added surfaceRegion({})", surfaceRegion.getName()); + lg.info("added surfaceRegion({})", surfaceRegion.getName()); } diff --git a/vcell-core/src/main/java/cbit/vcell/mapping/DiffEquMathMapping.java b/vcell-core/src/main/java/cbit/vcell/mapping/DiffEquMathMapping.java index aa934c2a97..6bda321e71 100644 --- a/vcell-core/src/main/java/cbit/vcell/mapping/DiffEquMathMapping.java +++ b/vcell-core/src/main/java/cbit/vcell/mapping/DiffEquMathMapping.java @@ -1454,7 +1454,7 @@ private void refreshMathDescription() throws MappingException, MatrixException, for(int i = 0; i < mappedSMs.length; i++){ if(mappedSMs[i] instanceof FeatureMapping){ if(mappedFM != null){ - if (lg.isDebugEnabled()) lg.warn("WARNING:::: MathMapping.refreshMathDescription() ... assigning boundary condition types not unique"); + lg.info("WARNING:::: MathMapping.refreshMathDescription() ... assigning boundary condition types not unique"); } mappedFM = (FeatureMapping) mappedSMs[i]; } diff --git a/vcell-core/src/main/java/cbit/vcell/mapping/LangevinMathMapping.java b/vcell-core/src/main/java/cbit/vcell/mapping/LangevinMathMapping.java index 262aa576f7..5b51b62947 100644 --- a/vcell-core/src/main/java/cbit/vcell/mapping/LangevinMathMapping.java +++ b/vcell-core/src/main/java/cbit/vcell/mapping/LangevinMathMapping.java @@ -415,7 +415,7 @@ protected void refreshMathDescription() throws MappingException, MatrixException for (int i = 0; i < mappedSMs.length; i++) { if (mappedSMs[i] instanceof FeatureMapping){ if (mappedFM!=null){ - if (lg.isDebugEnabled()) lg.warn("WARNING:::: MathMapping.refreshMathDescription() ... assigning boundary condition types not unique"); + lg.info("WARNING:::: MathMapping.refreshMathDescription() ... assigning boundary condition types not unique"); } mappedFM = (FeatureMapping)mappedSMs[i]; } diff --git a/vcell-core/src/main/java/cbit/vcell/mapping/ParticleMathMapping.java b/vcell-core/src/main/java/cbit/vcell/mapping/ParticleMathMapping.java index 96fc17ef6f..024d4ee7d9 100644 --- a/vcell-core/src/main/java/cbit/vcell/mapping/ParticleMathMapping.java +++ b/vcell-core/src/main/java/cbit/vcell/mapping/ParticleMathMapping.java @@ -487,7 +487,7 @@ private void refreshMathDescription() throws MappingException, MatrixException, for (int i = 0; i < mappedSMs.length; i++) { if (mappedSMs[i] instanceof FeatureMapping){ if (mappedFM!=null){ - if (lg.isDebugEnabled()) lg.warn("WARNING:::: MathMapping.refreshMathDescription() ... assigning boundary condition types not unique"); + lg.info("WARNING:::: MathMapping.refreshMathDescription() ... assigning boundary condition types not unique"); } mappedFM = (FeatureMapping)mappedSMs[i]; } diff --git a/vcell-core/src/main/java/cbit/vcell/solver/SolverUtilities.java b/vcell-core/src/main/java/cbit/vcell/solver/SolverUtilities.java index b42b6faf70..bf8a8b831c 100644 --- a/vcell-core/src/main/java/cbit/vcell/solver/SolverUtilities.java +++ b/vcell-core/src/main/java/cbit/vcell/solver/SolverUtilities.java @@ -164,8 +164,10 @@ private static List matchByKisaoId(KisaoTerm candidate) { for (SolverDescription sd : SolverDescription.values()) { if (sd.getKisao().contains(":") || sd.getKisao().contains("_")) { logger.trace(sd.getKisao()); + } else if ("KISAO".equals(sd.getKisao())){ + logger.info("Skipping not-yet-created KiSAO term"); } else { - if (logger.isDebugEnabled()) logger.warn("`{}` is bad KiSAO formating, skipping", sd.getKisao()); + logger.warn("`{}` is bad KiSAO formating, skipping", sd.getKisao()); continue; } String s1 = candidate.getId(); diff --git a/vcell-core/src/main/java/cbit/vcell/xml/XmlReader.java b/vcell-core/src/main/java/cbit/vcell/xml/XmlReader.java index b9eeda2ce8..fdc9d4067a 100644 --- a/vcell-core/src/main/java/cbit/vcell/xml/XmlReader.java +++ b/vcell-core/src/main/java/cbit/vcell/xml/XmlReader.java @@ -4562,7 +4562,7 @@ public Model getModel(Element param) throws XmlParseException{ if(element != null){ getRbmModelContainer(element, newmodel); } else { - if (lg.isDebugEnabled()) lg.info("RbmModelContainer is missing."); + lg.info("RbmModelContainer is missing."); } //Add SpeciesContexts diff --git a/vcell-core/src/main/java/org/jlibsedml/SEDMLReader.java b/vcell-core/src/main/java/org/jlibsedml/SEDMLReader.java index a9d4cbd9b8..8b3973e1fd 100644 --- a/vcell-core/src/main/java/org/jlibsedml/SEDMLReader.java +++ b/vcell-core/src/main/java/org/jlibsedml/SEDMLReader.java @@ -246,7 +246,7 @@ Algorithm getAlgorithm(Element algorithmElement) { if (eChild.getName().equals(SEDMLTags.ALGORITHM_PARAMETER_LIST)) { addAlgorithmParameters(alg, eChild); } else { - if (log.isDebugEnabled()) log.warn("Unexpected " + eChild); + log.warn("Unexpected " + eChild); } } return alg; diff --git a/vcell-core/src/main/java/org/jlibsedml/validation/SchemaValidatorImpl.java b/vcell-core/src/main/java/org/jlibsedml/validation/SchemaValidatorImpl.java index 43fc326c44..da4ca5cd8a 100644 --- a/vcell-core/src/main/java/org/jlibsedml/validation/SchemaValidatorImpl.java +++ b/vcell-core/src/main/java/org/jlibsedml/validation/SchemaValidatorImpl.java @@ -90,7 +90,7 @@ private String getSchema(String xmlAsString) throws JDOMException, return SEDML_L1_V2_SCHEMA; } else { // probably level 3, but trying anyway to interpret with level 2 - if (log.isDebugEnabled()) log.warn("SED-ML version level not supported, import may fail"); + log.info("WARNING: SED-ML version level not supported, import may fail"); return SEDML_L1_V3_SCHEMA; // throw new IllegalArgumentException( // "Invalid level/version combingation - must be 1-1 or 1-2 but was " diff --git a/vcell-core/src/main/java/org/jlibsedml/validation/SchematronValidator.java b/vcell-core/src/main/java/org/jlibsedml/validation/SchematronValidator.java index fe9cc0d43f..2f38bd7643 100644 --- a/vcell-core/src/main/java/org/jlibsedml/validation/SchematronValidator.java +++ b/vcell-core/src/main/java/org/jlibsedml/validation/SchematronValidator.java @@ -116,7 +116,7 @@ private String getSchematronXSL() { } else if (sedml.isL1V2()) { return "validatorl1v2.xsl"; } else { - if (lg.isDebugEnabled()) lg.warn("Unsupported version, import may fail"); + lg.warn("Unsupported version, import may fail"); return "validatorl1v2.xsl"; // throw new UnsupportedOperationException(MessageFormat.format( // "Invalid level and version - {0}-{1}", sedml.getLevel(), diff --git a/vcell-core/src/main/java/org/vcell/sedml/SEDMLImporter.java b/vcell-core/src/main/java/org/vcell/sedml/SEDMLImporter.java index bd2fa95e93..3a89814c46 100644 --- a/vcell-core/src/main/java/org/vcell/sedml/SEDMLImporter.java +++ b/vcell-core/src/main/java/org/vcell/sedml/SEDMLImporter.java @@ -195,7 +195,7 @@ public List getBioModels() { // try to find a match in the ontology tree SolverDescription solverDescription = SolverUtilities.matchSolverWithKisaoId(kisaoID, this.exactMatchOnly); if (solverDescription != null) { - if (logger.isDebugEnabled()) logger.info("Task (id='{}') is compatible, solver match found in ontology: '{}' matched to {}", selectedTask.getId(), kisaoID, solverDescription); + logger.info("Task (id='{}') is compatible, solver match found in ontology: '{}' matched to {}", selectedTask.getId(), kisaoID, solverDescription); } else { // give it a try anyway with our deterministic default solver solverDescription = SolverDescription.CombinedSundials; @@ -441,12 +441,10 @@ private List mergeBioModels(List bioModels) { BioModel bm0 = bioModels.get(0); for (int i = 1; i < bioModels.size(); i++) { - if (logger.isDebugEnabled()) - logger.info("--------------------\ncomparing model from `{}`\n with model from `{}`\n--------------------", - bioModels.get(i), bm0); + logger.debug("--------------------\ncomparing model from `{}`\n with model from `{}`\n--------------------", bioModels.get(i), bm0); RelationVisitor rvNotStrict = new ModelRelationVisitor(false); boolean equivalent = bioModels.get(i).getModel().relate(bm0.getModel(),rvNotStrict); - if (logger.isDebugEnabled()) logger.info("Equivalent => {}", equivalent); + logger.debug("Equivalent => {}", equivalent); if (!equivalent) return bioModels; } // all have matchable model, try to merge by pooling SimContexts @@ -1087,7 +1085,7 @@ private void translateAlgorithmParams(SolverTaskDescription simTaskDesc, org.jli NonspatialStochHybridOptions nonspatialSHO = simTaskDesc.getStochHybridOpt(); nonspatialSHO.setSDETolerance(Double.parseDouble(apValue)); } else { - logger.error("Algorithm parameter with kisao id '" + apKisaoID + "' not supported at this time, skipping."); + logger.info("WARNING: Algorithm parameter with kisao id '" + apKisaoID + "' not supported at this time, skipping."); } } simTaskDesc.setErrorTolerance(errorTolerance);