Skip to content

Commit

Permalink
Py4j gateway logging
Browse files Browse the repository at this point in the history
Automatically set to debug, which results in too much output. Manually
set to INFO instead.
  • Loading branch information
markgw committed Oct 2, 2020
1 parent 84bc733 commit ab4b6f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/python/pimlico/core/external/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Licensed under the GNU GPL v3.0 - http://www.gnu.org/licenses/gpl-3.0.en.html

from __future__ import print_function

import logging

from future import standard_library
standard_library.install_aliases()
from builtins import zip
Expand Down Expand Up @@ -241,6 +244,11 @@ def launch_gateway(gateway_class="py4j.GatewayServer", args=[],
from py4j.java_gateway import ProcessConsumer
from py4j.compat import Queue

# Make sure that java_gateway logger isn't set to debug, as it outputs tonnes
from py4j.java_gateway import logger as java_gateway_logger
if java_gateway_logger.level <= logging.DEBUG:
java_gateway_logger.setLevel(logging.INFO)

if startup_timeout is None:
startup_timeout = 10.

Expand Down

0 comments on commit ab4b6f7

Please sign in to comment.