fix logging of rows and columns

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2022-12-20 11:25:44 +01:00
parent 7a5f67ff31
commit 7d79879f66
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E
1 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@
import random
import collections
import logging
from DAS.block import *
from bitarray import bitarray
from bitarray.util import zeros
@ -136,10 +137,14 @@ class Validator:
self.sendColumn(c, self.columnIDs[c])
def logRows(self):
self.logger.debug("Rows: "+str(self.rows), extra=self.format)
if self.logger.isEnabledFor(logging.DEBUG):
for id in self.rowIDs:
self.logger.debug("Row %d: %s", id, self.getRow(id), extra=self.format)
def logColumns(self):
self.logger.debug("Columns: "+str(self.columns), extra=self.format)
if self.logger.isEnabledFor(logging.DEBUG):
for id in self.columnIDs:
self.logger.debug("Column %d: %s", id, self.getColumn(id), extra=self.format)
def restoreRows(self):
for id in self.rowIDs: