Skip to content

Configurable logger for connection pool #562

@DifferentialOrange

Description

@DifferentialOrange

There is a way to configure Logger for a connection (even though it may be not a modern Go way to deal with log customization):

Logger Logger

but no way to do so for connection pool:

log.Printf("tarantool: connect to %s failed: %s\n", instance.Name, err)

log.Printf("tarantool: connect to %s failed: %s\n", name, err)

so if you need to customize it in any way, you need to overwrite a global logger. It would be nice to be able to pass a custom logger to a pool constructor in case one needs it. (For example, we used it for a TCF client to hide expected connection error messages.) It also may be nice to rework existing Logger interface to something build-in like log or slog interface/type.

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