Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing spammy debug logging #1423

Merged
merged 2 commits into from
Sep 20, 2015
Merged

Conversation

wiredfool
Copy link
Member

When converting to the logging infrastructure, these logs were enabled (when previously commented out) at the default debugging level.

  • The inner code of Image._open_core is designed to fail over and over until one of the image formats matches. When there is an actual error in a test, it's totally buried in thousands of lines of extraneous errors.
  • PyAccess debugging is low level debugging only useful for hacking on PyAccess. It's not of general interest, and It also shows up in totally extraneous contexts, since it's hit on module load.

e.g.:

======================================================================
FAIL: Test writing arbitrary metadata into the tiff image directory
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/erics/Pillow/Tests/test_file_tiff_metadata.py", line 40, in test_rt_metadata
    self.assertEqual(loaded.tag[50839], basetextdata + " ?")
AssertionError: 'This is some arbitrary metadata for a text field \xff' != 'This is some arbitrary metadata for a text field ?'
-------------------- >> begin captured logging << --------------------
PIL.PyAccess: DEBUG: New PyAccess: RGB
PIL.PyAccess: DEBUG: {'palette': 0, 'bands': 3, 'image': 43230208, 'ysize': 128, 'image32': 43230208, 'depth': 0, 'image8': 0, 'mode': 'RGB', 'xsize': 128, 'linesize': 512, 'destroy': 47373773600256, 'pixelsize': 4, 'type': 0, 'block': 47355472}
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: Test metadata writing through the python code
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/erics/Pillow/Tests/test_file_tiff_metadata.py", line 93, in test_write_metadata
    original[tag], value, "%s didn't roundtrip" % tag)
AssertionError: WhitePoint didn't roundtrip
-------------------- >> begin captured logging << --------------------
PIL.PyAccess: DEBUG: New PyAccess: RGB
PIL.PyAccess: DEBUG: {'palette': 0, 'bands': 3, 'image': 43238928, 'ysize': 128, 'image32': 43238928, 'depth': 0, 'image8': 0, 'mode': 'RGB', 'xsize': 128, 'linesize': 512, 'destroy': 47373773600256, 'pixelsize': 4, 'type': 0, 'block': 47355472}
--------------------- >> end captured logging << ---------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant