Skip to content

Commit

Permalink
Use local logger
Browse files Browse the repository at this point in the history
Fixes #103
  • Loading branch information
sverhoeven committed Aug 18, 2021
1 parent 1882d5f commit 53861e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grpc4bmi/bmi_client_singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

REQUIRED_SINGULARITY_VERSION = '3.6.0'

log = logging.getLogger(__name__)


def check_singularity_version():
p = subprocess.Popen(['singularity', 'version'], stdout=subprocess.PIPE)
Expand Down Expand Up @@ -219,7 +221,7 @@ def __init__(self, image: str, work_dir: str, input_dirs: Iterable[str] = tuple(
# Change into working directory
args += ["--pwd", self.work_dir]
args.append(image)
logging.info(f'Running {image} singularity container on port {port}')
log.info(f'Running {image} singularity container on port {port}')
if capture_logs:
self.logfile = SpooledTemporaryFile(max_size=2 ** 16, # keep until 65Kb in memory if bigger write to disk
prefix='grpc4bmi-singularity-log',
Expand Down

0 comments on commit 53861e5

Please sign in to comment.