Hello Team, > I need help regarding parsing ai...
# replication-troubleshooting
m
Hello Team,
I need help regarding parsing airbyte-worker logs using Fluentd. Logs are not in JSON format hence It requires lot of effort to parse them in fluentd.
I've search a lil bit around how airbyte-worker produces logs, and it turns out that it primarily uses Logback (which is successor to Log4j) framework. I'm trying to find the logback.xml file which suppose to be present in
airbyte-config
directory, but I couldn't find it there. I wanted to see how can I format these logs in JSON format by changing the xml file. Since I've deployed airbyte in K8S, so I'm really really interested if the above logging format is parameterized and I want to change them from
.env
file. Though I've seen some of environment variables in .env file.
Copy code
### LOGGING/MONITORING/TRACKING ###
TRACKING_STRATEGY=segment
JOB_ERROR_REPORTING_STRATEGY=logging
# Although not present as an env var, expected by Log4J configuration.
LOG_LEVEL=INFO
Thanks in advance!
✅ 1
@Marcos Marx (Airbyte) can you please comment on that?
I'm able to find the log4j2.xml file. Currently it produces airbyte-worker logs as the following 1st type of logs:
Copy code
2023-02-17 06:25:07 INFO i.a.w.p.KubeProcessFactory(create):106 - source-google-sheets-read-9914-0-qpyyl stderrLocalPort = 9039
Log4j2Appender says: source-google-sheets-read-9914-0-qpyyl stderrLocalPort = 9039
2nd type of logs:
Copy code
2023-02-17 06:25:17 destination > Starting a new buffer for stream tableprefixthatislongtotestiutifitsdsadsafsdgfsdfn_Automation (current state: 0 bytes in 0 buffers)
Log4j2Appender says: Starting a new buffer for stream tableprefixthatislongtotestiutifitsdsadsafsdgfsdfn_Automation (current state: 0 bytes in 0 buffers)
2023-02-17 06:25:18 destination > Airbyte message consumer: succeeded.
Log4j2Appender says: Airbyte message consumer: succeeded.
3rd type of logs:
Copy code
2023-02-17 06:40:20 INFO i.a.w.t.s.a.StreamResetActivityImpl(deleteStreamResetRecordsForJob):37 - deleteStreamResetRecordsForJob was called for job 9915 with config type sync. Returning, as config type is not resetConnection.
Collecting content into /tmp/toBePublished7345983446289804496.tmp before uploading.
Publishing to S3 (bucket=cdpaas-airbyte-dev-logs; key=job-logging/workspace/9915/0/logs.log/20230217064043_airbyte-worker-68d7597d5f-7xnkr_2fe388fd80964e11830b586dfdfa5d8a):
What I want is the following:
Copy code
logs: {ts:"<timestamp>", level:<log-level>, msg:<complte-msg>}
@Davin Chia (Airbyte) @Marcos Marx (Airbyte) Can you guys look into it?
d