Add generic debug logging to records

This commit is contained in:
Jan Petykiewicz 2018-07-21 13:43:24 -07:00
parent daf301dfce
commit 0cb4cf4d4b

View File

@ -16,6 +16,8 @@ import copy
import math
import zlib
import io
import logging
import pprint
from .basic import AString, NString, repetition_t, property_value_t, real_t, \
ReuseRepetition, OffsetTable, Validation, read_point_list, read_property_value, \
@ -24,6 +26,9 @@ from .basic import AString, NString, repetition_t, property_value_t, real_t, \
write_property_value, read_bool_byte, write_bool_byte, read_byte, write_byte, \
InvalidDataError, PathExtensionScheme
logger = logging.getLogger(__name__)
'''
Type definitions
'''
@ -186,6 +191,9 @@ class Record(metaclass=ABCMeta):
"""
return copy.deepcopy(self)
def __repr__(self) -> str:
return '{}: {}'.format(self.__class__, pprint.pformat(self.__dict__))
def read_refname(stream: io.BufferedIOBase,
is_present: bool,