jart / fabulous

Print images, colors, and stylish text to the terminal with Python
Apache License 2.0
345 stars 34 forks source link

Fabulous interferes with logging level #17

Open aarongorka opened 5 years ago

aarongorka commented 5 years ago

Importing a module from fabulous (e.g. from fabulous import image as fab_image) causes my logging to disappear:

This is the Docker environment if you want to reproduce it exactly:

FROM python:3.7-alpine
ENV PYTHONUNBUFFERED=1  # doesn't have any effect
RUN pip3 install --no-cache-dir fabulous

docker-compose.yml:

version: '3.7'
services:
  logging_test:
    build: .
    volumes:
      - .:/work:Z
    working_dir: /work
#!/usr/bin/env python3
import logging
from fabulous import image as fab_image

logging.basicConfig(level=logging.INFO)

logging.info('Hello!')

docker-compose run --rm logging_test ./logging_test.py prints absolutely nothing. Removing the import makes it print to the terminal again.

I've also noticed that fabulous doesn't like the Docker TTY, as a docker run -it crashes calls to the fabulous text/image modules but docker-compose works.