Skip to content

using --filebeat skips the first logs #897

@tarekziade

Description

@tarekziade

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions