/** * Log the end of a particular operation the beginning of which has been * logged using logOperationStart(), using INFO priority. * * @param operationName * @param logger */ public static void logOperationFinish(String operationName, Logger logger) { logOperationFinish(operationName, logger, Level.INFO); }
/** * Log the start of a particular operation with INFO priority. This method * should be used for long-running tasks and is mainly intended. Multiple * threads can independently log operations of the same name, but * (obviously) no single thread should use the same operation name to record * the start and end of overlapping code. * * @param operationName * @param logger */ public static void logOperationStart(String operationName, Logger logger) { logOperationStart(operationName, logger, LogLevel.INFO); }
/** * Log the current total memory usage using DEBUG priority. * * @param logger */ public static void logMemoryUsage(Logger logger) { logMemoryUsage(logger, LogLevel.DEBUG); }
@Override public void execute(ReasonerStage stage) throws ElkException { LOGGER_.debug("{} stage:", stage); Statistics.logOperationStart(stage.getName(), LOGGER_); try { stage.preExecute(); stage.execute(); stage.printInfo(); stage.postExecute(); } catch (ElkInterruptedException e) { LOGGER_.debug("{} was interrupted.", stage); stage.printInfo(); throw e; } finally { Statistics.logOperationFinish(stage.getName(), LOGGER_); Statistics.logMemoryUsage(LOGGER_); } LOGGER_.debug("{}: done.", stage); } }
static void writeInstanceTaxonomyToFile(File file, InstanceTaxonomy<ElkClass, ElkNamedIndividual> taxonomy, boolean printHash) throws IOException, ElkInconsistentOntologyException, ElkException { LOGGER_.info("Writing taxonomy with instances to {}", file); Statistics .logOperationStart("Writing taxonomy with instances", LOGGER_); TaxonomyPrinter.dumpInstanceTaxomomyToFile(taxonomy, file.getPath(), printHash); Statistics.logOperationFinish("Writing taxonomy with instances", LOGGER_); }
@Override public void execute(ReasonerStage stage) throws ElkException { LOGGER_.debug("{} stage:", stage); Statistics.logOperationStart(stage.getName(), LOGGER_); try { stage.preExecute(); stage.execute(); stage.printInfo(); stage.postExecute(); } catch (ElkInterruptedException e) { LOGGER_.debug("{} was interrupted.", stage); stage.printInfo(); throw e; } finally { Statistics.logOperationFinish(stage.getName(), LOGGER_); Statistics.logMemoryUsage(LOGGER_); } LOGGER_.debug("{}: done.", stage); } }
static void writeClassTaxonomyToFile(File file, Taxonomy<ElkClass> taxonomy, boolean printHash) throws IOException, ElkInconsistentOntologyException, ElkException { LOGGER_.info("Writing taxonomy to {}", file); Statistics.logOperationStart("Writing taxonomy", LOGGER_); TaxonomyPrinter.dumpTaxomomyToFile(taxonomy, file.getPath(), printHash); Statistics.logOperationFinish("Writing taxonomy", LOGGER_); }
@Override public void execute(ReasonerStage stage) throws ElkException { LOGGER_.debug("{} stage:", stage); Statistics.logOperationStart(stage.getName(), LOGGER_); try { stage.preExecute(); stage.execute(); stage.printInfo(); stage.postExecute(); } catch (ElkInterruptedException e) { LOGGER_.debug("{} was interrupted.", stage); stage.printInfo(); throw e; } finally { Statistics.logOperationFinish(stage.getName(), LOGGER_); Statistics.logMemoryUsage(LOGGER_); } LOGGER_.debug("{}: done.", stage); } }
static void writeClassTaxonomyToFile(File file, Taxonomy<ElkClass> taxonomy) throws IOException, ElkInconsistentOntologyException, ElkException { if (LOGGER_.isInfoEnabled()) { LOGGER_.info("Writing taxonomy to " + file); } Statistics.logOperationStart("Writing taxonomy", LOGGER_); TaxonomyPrinter.dumpClassTaxomomyToFile(taxonomy, file.getPath(), true); Statistics.logOperationFinish("Writing taxonomy", LOGGER_); }
/** * Log the end of a particular operation the beginning of which has been * logged using logOperationStart(), using INFO priority. * * @param operationName * @param logger */ public static void logOperationFinish(String operationName, Logger logger) { logOperationFinish(operationName, logger, LogLevel.INFO); }
/** * Log the start of a particular operation with INFO priority. This method * should be used for long-running tasks and is mainly intended. Multiple * threads can independently log operations of the same name, but * (obviously) no single thread should use the same operation name to record * the start and end of overlapping code. * * @param operationName * @param logger */ public static void logOperationStart(String operationName, Logger logger) { logOperationStart(operationName, logger, LogLevel.INFO); }
/** * Log the current total memory usage using DEBUG priority. * * @param logger */ public static void logMemoryUsage(Logger logger) { logMemoryUsage(logger, LogLevel.DEBUG); }
static void writeInstanceTaxonomyToFile(File file, InstanceTaxonomy<ElkClass, ElkNamedIndividual> taxonomy) throws IOException, ElkInconsistentOntologyException, ElkException { if (LOGGER_.isInfoEnabled()) { LOGGER_.info("Writing taxonomy with instances to " + file); } Statistics .logOperationStart("Writing taxonomy with instances", LOGGER_); TaxonomyPrinter.dumpInstanceTaxomomyToFile(taxonomy, file.getPath(), true); Statistics.logOperationFinish("Writing taxonomy with instances", LOGGER_); }
/** * Log the end of a particular operation the beginning of which has been * logged using logOperationStart(), using INFO priority. * * @param operationName * @param logger */ public static void logOperationFinish(String operationName, Logger logger) { logOperationFinish(operationName, logger, LogLevel.INFO); }
/** * Log the start of a particular operation with INFO priority. This method * should be used for long-running tasks and is mainly intended. Multiple * threads can independently log operations of the same name, but * (obviously) no single thread should use the same operation name to record * the start and end of overlapping code. * * @param operationName * @param logger */ public static void logOperationStart(String operationName, Logger logger) { logOperationStart(operationName, logger, Level.INFO); }
/** * Log the current total memory usage using DEBUG priority. * * @param logger */ public static void logMemoryUsage(Logger logger) { logMemoryUsage(logger, Level.DEBUG); }
/** * Log the end of a particular operation the beginning of which has been * logged using logOperationStart(), using INFO priority. * * @param operationName * @param logger */ public static void logOperationFinish(String operationName, Logger logger) { logOperationFinish(operationName, logger, LogLevel.INFO); }
/** * Log the start of a particular operation with INFO priority. This method * should be used for long-running tasks and is mainly intended. Multiple * threads can independently log operations of the same name, but * (obviously) no single thread should use the same operation name to record * the start and end of overlapping code. * * @param operationName * @param logger */ public static void logOperationStart(String operationName, Logger logger) { logOperationStart(operationName, logger, LogLevel.INFO); }
/** * Log the current total memory usage using DEBUG priority. * * @param logger */ public static void logMemoryUsage(Logger logger) { logMemoryUsage(logger, LogLevel.DEBUG); }