Skip to content

Log message count increases after each reload #7

@gerardroche

Description

@gerardroche

When plugins use python's built in logging, log messages are duplicated on each reload.

An example is NeoVintageous, https://github.com/NeoVintageous/NeoVintageous/blob/master/lib/nvim.py#L97. Each time the plugin reloaded it reinitialises the logger, so after three reloads you end up with something like:

2017-09-04 17:31:25,466 DEBUG NeoVintageous.lib.state@eval:782 run command action=None, motion=<ViMoveUpByLines (<unset>)>
2017-09-04 17:31:25,466 DEBUG NeoVintageous.lib.state@eval:782 run command action=None, motion=<ViMoveUpByLines (<unset>)>
2017-09-04 17:31:25,466 DEBUG NeoVintageous.lib.state@eval:782 run command action=None, motion=<ViMoveUpByLines (<unset>)>
2017-09-04 17:31:25,466 DEBUG NeoVintageous.lib.state@eval:782 run command action=None, motion=<ViMoveUpByLines (<unset>)>
2017-09-04 17:31:25,481 DEBUG NeoVintageous.lib.state@register:371 '"'
2017-09-04 17:31:25,481 DEBUG NeoVintageous.lib.state@register:371 '"'
2017-09-04 17:31:25,481 DEBUG NeoVintageous.lib.state@register:371 '"'
2017-09-04 17:31:25,481 DEBUG NeoVintageous.lib.state@register:371 '"'

I'm wondering if it's possible for AutomaticPackageReloader to reset/clear any package loggers before reloading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions