Skip to content

Fix and add warning for duplicate logger context names #79514

Open

Description

By default, Kibana plugins are provided with a Logger instance that is already configured with a context name of the format plugins.<pluginId>. However, some plugins are creating child loggers that ALSO add the plugin's ID, resulting in a context like plugins.<pluginId>.<pluginId>.

This is unnecessary and should be removed. Here are some plugins currently doing this:

First, we should definitely fix the offending plugins. But second, we could improve the developer experience here by logging a warning (in development?) when a logger.getLogger is called with a consecutive duplicate context name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Feature:LoggingTeam:CoreCore services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions