Skip to content

Add connection identifier to logging output #98

@volcan01010

Description

@volcan01010

Summary

As an ETL pipeline user, I want to know which database connection log messages correspond to so that I can have a better idea of where my process is.

Description

When messages from ETL Helper logger are consumed by other handlers they can end up like this:

16:43:26 etlhelper INFO   Fetching rows
16:43:27 etlhelper INFO   108 rows returned
16:43:30 etlhelper INFO   Executing query

If the pipeline involves multiple databases, there is no way to know which database the messages correspond to. The messages should be updated to provide some information about the connection.

(It is probably not possible to put the DbParams variable name in the message there as I'm not sure if that is accessible when the log messages are written. If it was possible, that would be best. It may be necessary to add a "name" attribute to DbParams classes.)

Acceptance criteria

Log messages look like:

  • [ ] 16:43:30 etlhelper INFO Fetching rows from MY_DB

of if that isn't possible

  • [ ] 16:43:30 etlhelper INFO Fetching rows from user@db.hostname:1234/db

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions