Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(attach): allow custom logger for attach neovim proc #138

Merged
merged 2 commits into from
Jan 9, 2020
Merged

feat(attach): allow custom logger for attach neovim proc #138

merged 2 commits into from
Jan 9, 2020

Conversation

kwonoj
Copy link
Contributor

@kwonoj kwonoj commented Jan 7, 2020

relates to vscode-neovim/vscode-neovim#134

current logger only allows customizable behavior via env variable which works for majority of node.js entrypoint, but some cases (like vs code extension) overriding env variable is not very much feasible cases. NeovimClient ctor already accepts custom logger, but attach does not exposes it - this PR expands signature to attach to allow specify options for customizing points.

Instead of expanding param to directly accepts logger, it accepts options object instead for possible future customizations.

Copy link
Member

@rhysd rhysd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@rhysd rhysd requested a review from billyvg January 8, 2020 05:45
@rhysd
Copy link
Member

rhysd commented Jan 8, 2020

@billyvg Would you also check this PR and make a new release if you're ok?

@rhysd rhysd merged commit d9bc2ef into neovim:master Jan 9, 2020
@rhysd
Copy link
Member

rhysd commented Jan 9, 2020

@kwonoj I merged. Thank you for adding this.

justinmk added a commit that referenced this pull request Mar 18, 2024
Problem:
d9bc2ef #138 allows clients to supply
a custom logger, but the logger is not always used. And the
winstonLogger is always initialized, even when a custom logger is given.

Solution:
- Update all logging calls to use the custom logger.
- Skip initialization of winstonLogger if a custom logger is given.
justinmk added a commit that referenced this pull request Mar 18, 2024
Problem:
d9bc2ef #138 allows clients to supply
a custom logger, but the logger is not always used. And the
winstonLogger is always initialized, even when a custom logger is given.

Solution:
- Update all logging calls to use the custom logger.
- Skip initialization of winstonLogger if a custom logger is given.
justinmk added a commit that referenced this pull request Mar 18, 2024
Problem:
d9bc2ef #138 allows clients to supply
a custom logger, but the logger is not always used. And the
winstonLogger is always initialized, even when a custom logger is given.

Solution:
- Update all logging calls to use the custom logger.
- Skip initialization of winstonLogger if a custom logger is given.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants