diff --git a/PIL/Image.py b/PIL/Image.py index af6dac1c4..3865e9c0f 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -32,6 +32,7 @@ import logging import warnings logger = logging.getLogger(__name__) +logger.addHandler(logging.NullHandler()) class DecompressionBombWarning(RuntimeWarning): diff --git a/PIL/ImageFile.py b/PIL/ImageFile.py index f26a7260e..88952649d 100644 --- a/PIL/ImageFile.py +++ b/PIL/ImageFile.py @@ -36,6 +36,7 @@ import sys import struct logger = logging.getLogger(__name__) +logger.addHandler(logging.NullHandler()) MAXBLOCK = 65536 diff --git a/PIL/PcxImagePlugin.py b/PIL/PcxImagePlugin.py index 9440d5362..ef057ed11 100644 --- a/PIL/PcxImagePlugin.py +++ b/PIL/PcxImagePlugin.py @@ -31,6 +31,7 @@ import logging from PIL import Image, ImageFile, ImagePalette, _binary logger = logging.getLogger(__name__) +logger.addHandler(logging.NullHandler()) i8 = _binary.i8 i16 = _binary.i16le diff --git a/PIL/PngImagePlugin.py b/PIL/PngImagePlugin.py index d6778821b..ec7c4c59b 100644 --- a/PIL/PngImagePlugin.py +++ b/PIL/PngImagePlugin.py @@ -42,6 +42,7 @@ from PIL import Image, ImageFile, ImagePalette, _binary __version__ = "0.9" logger = logging.getLogger(__name__) +logger.addHandler(logging.NullHandler()) i8 = _binary.i8 i16 = _binary.i16be diff --git a/PIL/PyAccess.py b/PIL/PyAccess.py index 0d4c8b235..8c1e4558d 100644 --- a/PIL/PyAccess.py +++ b/PIL/PyAccess.py @@ -29,6 +29,7 @@ from cffi import FFI logger = logging.getLogger(__name__) +logger.addHandler(logging.NullHandler()) defs = """ diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index f900b97cf..2abf605b4 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -10,6 +10,7 @@ import os from PIL import Image, TiffImagePlugin logger = logging.getLogger(__name__) +logger.addHandler(logging.NullHandler()) class LibTiffTestCase(PillowTestCase): diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 308783fb3..9141668c3 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -7,6 +7,7 @@ from helper import unittest, PillowTestCase, hopper, py3 from PIL import Image, TiffImagePlugin logger = logging.getLogger(__name__) +logger.addHandler(logging.NullHandler()) class TestFileTiff(PillowTestCase):