In my python source connector, the log message for...
# help-connector-development
c
In my python source connector, the log message for my state emissions is large because my state is large (contains a large array). What is the best way to avoid large log lines here? Can I customize the logger message formatter?
k
A message from kapa.ai
New message text here
c
No not debug information. These are INFO log messages that airbyte produces when state is emitted. Here is an example:
Copy code
{"type":"STATE","state":{"data":{"reservation_ids":[62941,778071,805434,837587,846921,850572,852987,864430,878524,882759,892614,892746,894022,660579,852409,854318,890223,890694,892555,894667,895107,895338,262871,729978,832009,857881,876007,876587,876984,877488,882931,884634,885845,892690,894284,895029,895769,896390,794140,818995,828512,828515,872221,873133,873507,876713,877507, ...
It is the
STATE
log type. I want to be able to somehow make the size of these log messages smaller. Any suggestions @kapa.ai?
k
A message from kapa.ai
The
STATE
messages in Airbyte are used for checkpointing during data replication. These messages allow the next sync to start from the last checkpoint instead of returning to the beginning of the previous sync if replication fails before completion. The state message is a wrapper around the state that a Source emits and is treated as a black box by the protocol--it is modeled as a JSON blob. The size of the
STATE
messages is directly related to the amount of data being processed and checkpointed. Reducing the size of these messages would involve reducing the amount of data being processed at a time, which could potentially impact the efficiency of your data replication. However, if you're looking to reduce the verbosity of the logs, you might want to consider adjusting the log level settings. Unfortunately, the provided extracts do not contain specific information on how to adjust these settings in Airbyte. For more details on
STATE
messages and their role in Airbyte, you can refer to the [Airbyte Protocol documentation](https://docs.airbyte.com/understanding-airbyte/airbyte-protocol). Please note that any modifications to the state management process should be done with caution, as it could impact the integrity and reliability of your data replication.