Closed resolutiontime closed 2 years ago
Thanks for the quick response. Of course i can share more details with you. Iam using smbclient on airflow server in DAG`s like this:
import smbclient smbclient.register_session(HOST, username=USERNAME, password=PASSWORD) with smbclient.open_file(PATH, mode="rb") as file: new_file = pd.read_excel(file)
And i get in DAG`s logfile a lot of rows of somthing from smbclient. It's about millions of lines that makes my logfile super large and not usable. how can i fix that? I think problem not in airflow server, problem is in configurations of smbclient. Thank you in advance!
Is this is basic stdlib logging question and not related to smbprotocol ?
Would something like this do the job ?
import logging
# Set level to your needs. The example disable the logs.
logging.getLogger('smbclient').setLevel(600)
logging.getLogger('smbprotocol').setLevel(600)
It`s great! Sorry for this amateur question and thank you for operative. You helped me a lot!
Thanks @adiroiban for the info. This library uses the standard python library logging library. By default the logs aren’t enabled so sounds like the runner that’s being used is enabling them. Explicitly disabling them works as commented.
Logging isn’t enabled by default, you have to opt into it. Can you share more details.