From 92b9b2f03e876d57f16c0da651ea7ad96f14f0ce Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Mon, 25 Feb 2019 17:07:25 +0100
Subject: [PATCH] Use logger from log module instead of being a parameter

It's an API breaking change, so that's a major release then. Sigh.
---
 pom.xml                     |  2 +-
 src/imcflibs/imagej/misc.py | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6eb452a..ef5c77d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
 
 	<groupId>ch.unibas.biozentrum.imcf</groupId>
 	<artifactId>python-imcflibs</artifactId>
-	<version>0.5.2-SNAPSHOT</version>
+	<version>1.0.0-SNAPSHOT</version>
 
 	<name>python-imcflibs</name>
 	<description>
diff --git a/src/imcflibs/imagej/misc.py b/src/imcflibs/imagej/misc.py
index 07851fc..e8fff0b 100644
--- a/src/imcflibs/imagej/misc.py
+++ b/src/imcflibs/imagej/misc.py
@@ -2,14 +2,16 @@
 
 from ij import IJ  # pylint: disable-msg=E0401
 
-def show_status(logger, msg):
+from ..log import LOG as log
+
+def show_status(msg):
     """Wrapper to update the ImageJ status bar and the log simultaneously."""
-    logger.info(msg)
+    log.info(msg)
     IJ.showStatus(msg)
 
 
-def show_progress(logger, cur, final):
+def show_progress(cur, final):
     """Wrapper to update the progress bar and issue a log message."""
     # ij.IJ.showProgress is adding 1 to the value given as first parameter...
-    logger.info("Progress: %s / %s (%s)" % (cur+1, final, (1.0+cur)/final))
+    log.info("Progress: %s / %s (%s)", cur+1, final, (1.0+cur)/final)
     IJ.showProgress(cur, final)
-- 
GitLab