From 65e03d67d698436689094f9f8fa5f7effa757d7e Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sat, 21 Jul 2018 13:39:47 -0700 Subject: [PATCH] Use logging module for printing --- fatamorgana/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fatamorgana/main.py b/fatamorgana/main.py index f8dec6a..f215b2a 100644 --- a/fatamorgana/main.py +++ b/fatamorgana/main.py @@ -4,6 +4,7 @@ This module contains data structures and functions for reading from and abstractions for the data contained inside them. """ import io +import logging from . import records from .records import Modals @@ -15,6 +16,9 @@ from .basic import OffsetEntry, OffsetTable, NString, AString, real_t, Validatio __author__ = 'Jan Petykiewicz' +logger = logging.getLogger(__name__) + + class FileModals: """ File-scoped modal variables @@ -141,8 +145,7 @@ class OasisLayout: else: raise e - # TODO logging - print(record_id, stream.tell()) + logger.info('read_record of type {} at position 0x{:x}'.format(record_id, stream.tell())) # CBlock if record_id == 34: