datajoint-python icon indicating copy to clipboard operation
datajoint-python copied to clipboard

How to log/print in computed table

Open Hegelim opened this issue 1 year ago • 1 comments
trafficstars

Suppose I have defined some computed table schema that looks like the following

def make(self, key):
        source = self.key_source

        # Debugging key source
        logging.info(f"Key Source: {source}")
        logging.info(f"Key: {key}")

        key_dict = (source & key).fetch1()
        logging.info(key_dict)
        logging.debug(key_dict)
        print(key_dict)

Suppose this is for class A, and I want to run A().populate(). I have tried logging/print/logging to file, but none of them work. How to properly log/print/debug?

Hegelim avatar Aug 07 '24 21:08 Hegelim