Skip to content

Commit

Permalink
Java logback configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
GenevieveBuckley authored and tacaswell committed Apr 7, 2022
1 parent 4cb7fbc commit 1075f48
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
@@ -1,6 +1,7 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)

from turtle import pd
import numpy as np

from pims.base_frames import FramesSequence, FramesSequenceND
Expand Down Expand Up @@ -345,6 +346,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 1075f48

Please sign in to comment.