Skip to content

Commit

Permalink
Java logback configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
GenevieveBuckley committed Mar 21, 2022
1 parent 528315e commit 43c9b7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pims/bioformats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
unicode_literals)

from distutils.version import LooseVersion
from turtle import pd
import numpy as np

from pims.base_frames import FramesSequence, FramesSequenceND
Expand Down Expand Up @@ -344,6 +345,10 @@ def __init__(self, filename, meta=True, java_memory='512m',
jpype.startJVM(jpype.getDefaultJVMPath(), '-ea',
'-Djava.class.path=' + bioformats_package_path,
'-Xmx' + java_memory, **startJVM_kwargs)
logback = jpype.JPackage('ch.qos.logback.classic')
logger_context = logback.LoggerContext()
logback.BasicConfigurator().setContext(logger_context)
logback.BasicConfigurator().configure(logger_context)

if not jpype.isThreadAttachedToJVM():
jpype.attachThreadToJVM()
Expand Down

0 comments on commit 43c9b7f

Please sign in to comment.