if (!MaryUtils.isLog4jConfigured()) { // maybe log4j has been externally configured already?
if (!MaryUtils.isLog4jConfigured()) { // maybe log4j has been externally configured already?
public MaryModuleTestCase(boolean needMaryStarted) throws Exception { if (!MaryUtils.isLog4jConfigured()) { BasicConfigurator.configure(); } Logger.getRootLogger().setLevel(Level.DEBUG); if (System.getProperty("mary.base") == null) { System.setProperty("mary.base", "."); Logger.getRootLogger().warn( "System property 'mary.base' is not defined -- trying " + new File(".").getAbsolutePath() + " -- if this fails, please start this using VM property \"-Dmary.base=/path/to/mary/runtime\"!"); } if (needMaryStarted) { if (Mary.currentState() == Mary.STATE_OFF) Mary.startup(); } }
public MaryModuleTestCase(boolean needMaryStarted) throws Exception { if (!MaryUtils.isLog4jConfigured()) { BasicConfigurator.configure(); } Logger.getRootLogger().setLevel(Level.DEBUG); if (System.getProperty("mary.base") == null) { System.setProperty("mary.base", "."); Logger.getRootLogger().warn( "System property 'mary.base' is not defined -- trying " + new File(".").getAbsolutePath() + " -- if this fails, please start this using VM property \"-Dmary.base=/path/to/mary/runtime\"!"); } if (needMaryStarted) { if (Mary.currentState() == Mary.STATE_OFF) Mary.startup(); } }
public Mary4To5VoiceConverter(List<VoiceComponentDescription> voiceDescriptions, File voiceZip) { voiceDescription = null; mary4Zip = voiceZip; for (VoiceComponentDescription d : voiceDescriptions) { if (d.getPackageFilename().equals(mary4Zip.getName())) { voiceDescription = d; break; } } if (voiceDescription == null) { throw new IllegalArgumentException("No matching voice description for file " + mary4Zip.getName()); } if (!MaryUtils.isLog4jConfigured()) { BasicConfigurator.configure(); } logger = Logger.getLogger(this.getClass()); logger.info(voiceDescription.getName() + " " + voiceDescription.getVersion() + " (" + voiceDescription.getLocale() + " " + voiceDescription.getGender() + ")"); }
if (!MaryUtils.isLog4jConfigured()) { // maybe log4j has been externally configured already?