Skip to content
Snippets Groups Projects
Commit 92b9b2f0 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Use logger from log module instead of being a parameter

It's an API breaking change, so that's a major release then. Sigh.
parent 24d92caf
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<groupId>ch.unibas.biozentrum.imcf</groupId> <groupId>ch.unibas.biozentrum.imcf</groupId>
<artifactId>python-imcflibs</artifactId> <artifactId>python-imcflibs</artifactId>
<version>0.5.2-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<name>python-imcflibs</name> <name>python-imcflibs</name>
<description> <description>
......
...@@ -2,14 +2,16 @@ ...@@ -2,14 +2,16 @@
from ij import IJ # pylint: disable-msg=E0401 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.""" """Wrapper to update the ImageJ status bar and the log simultaneously."""
logger.info(msg) log.info(msg)
IJ.showStatus(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.""" """Wrapper to update the progress bar and issue a log message."""
# ij.IJ.showProgress is adding 1 to the value given as first parameter... # 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) IJ.showProgress(cur, final)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment