diff --git a/bioformats/log4j.py b/bioformats/log4j.py index 092bcf5..fc6983f 100644 --- a/bioformats/log4j.py +++ b/bioformats/log4j.py @@ -1,7 +1,7 @@ # Python-bioformats is distributed under the GNU General Public # License, but this file is licensed under the more permissive BSD # license. See the accompanying file LICENSE for details. -# +# # Copyright (c) 2009-2014 Broad Institute # All rights reserved. @@ -9,4 +9,6 @@ def basic_config(): '''Configure logging for "WARN" level''' - javabridge.JClassWrapper("loci.common.Log4jTools").enableLogging("WARN") + log4j = javabridge.JClassWrapper("loci.common.Log4jTools") + log4j.enableLogging() + log4j.setRootLevel("WARN") diff --git a/demo/demo.py b/demo/demo.py index cfe2676..93c9725 100755 --- a/demo/demo.py +++ b/demo/demo.py @@ -13,8 +13,13 @@ try: log4j.basic_config() if len(sys.argv) < 2: - image_path = os.path.join(os.path.dirname(bioformats.__file__), 'tests', - 'Channel1-01-A-01.tif') + image_path = os.path.join( + os.path.dirname(bioformats.__file__), + '..', + 'tests', + 'resources', + 'Channel1-01-A-01.tif' + ) else: image_path = sys.argv[1] image, scale = bioformats.load_image(image_path, rescale=False,