connectors icon indicating copy to clipboard operation
connectors copied to clipboard

using `--filebeat` skips the first logs

Open tarekziade opened this issue 1 year ago • 0 comments

when you run with --filebeat the service will still emit a few lines in plain text before it starts spitting proper JSON

% bin/elastic-ingest --filebeat
[FMWK][10:31:29][INFO] Running connector service version 8.9.0.0
[FMWK][10:31:29][INFO] Loading config from /Users/tarekziade/Dev/connectors-python/connectors/../config.yml
{"@timestamp":"2023-05-10T17:31:29.188Z","log.level":"info","message":"Preflight checks...","ecs":{"version":"1.6.0"},"labels":{"index_date":"2023.05.10"},"log":{"logger":"connectors","origin":{"file":{"line":37,"name":"preflight_check.py"},"function":"run"},"original":"Preflight checks..."},"process":{"name":"MainProcess","pid":86910,"thread":{"id":140704442393408,"name":"MainThread"}},"service":{"type":"connectors-python","version":"8.9.0.0"}}
[..]

We should make sure the logger is activated before the first log line is emited

tarekziade avatar May 10 '23 17:05 tarekziade