what is the proper method to log from the write co...
# replication-ask-ai
a
what is the proper method to log from the write command of a python source connector?
k
When implementing the
write
command of a Python source connector, all logging should be done through the
logger
object passed into each method. This is important because logs will not be shown in the Airbyte UI if they are not logged through this object. Here is an example of how to use the
logger
object for logging:
Copy code
python def write(self, config, catalog, records):     <http://self.logger.info|self.logger.info>("This is a log message.")
In this example,
<http://self.logger.info|self.logger.info>
is used to log an informational message. You can replace
"This is a log message."
with your own message. For more information, you can refer to the [Building a Python Source](https://docs.airbyte.com/connector-development/tutorials/building-a-python-source) tutorial in the Airbyte documentation.