Skip to content

Commit 3cca4e6

Browse files
authored
Merge pull request #90 from /issues/89
Fix demo script.
2 parents e70392d + 9f5a41f commit 3cca4e6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

bioformats/log4j.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Python-bioformats is distributed under the GNU General Public
22
# License, but this file is licensed under the more permissive BSD
33
# license. See the accompanying file LICENSE for details.
4-
#
4+
#
55
# Copyright (c) 2009-2014 Broad Institute
66
# All rights reserved.
77

88
import javabridge
99

1010
def basic_config():
1111
'''Configure logging for "WARN" level'''
12-
javabridge.JClassWrapper("loci.common.Log4jTools").enableLogging("WARN")
12+
log4j = javabridge.JClassWrapper("loci.common.Log4jTools")
13+
log4j.enableLogging()
14+
log4j.setRootLevel("WARN")

demo/demo.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
try:
1414
log4j.basic_config()
1515
if len(sys.argv) < 2:
16-
image_path = os.path.join(os.path.dirname(bioformats.__file__), 'tests',
17-
'Channel1-01-A-01.tif')
16+
image_path = os.path.join(
17+
os.path.dirname(bioformats.__file__),
18+
'..',
19+
'tests',
20+
'resources',
21+
'Channel1-01-A-01.tif'
22+
)
1823
else:
1924
image_path = sys.argv[1]
2025
image, scale = bioformats.load_image(image_path, rescale=False,

0 commit comments

Comments
 (0)