-
Notifications
You must be signed in to change notification settings - Fork 79
Add handleServerStderr
method + default logging
#158
Conversation
lib/auto-languageclient.js
Outdated
@@ -270,16 +269,6 @@ export default class AutoLanguageClient { | |||
}); | |||
} | |||
|
|||
handleSpawnFailure(err: any): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need this to report when starting a language server fails to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this work though, node processes don't seem to have an error
event as the previous (unused) code used to call this method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right thanks, I was looking at process
rather than child-
lib/auto-languageclient.js
Outdated
*/ | ||
handleServerStderr(stderr: string, projectPath: string) { | ||
this.logger.debug(`stderr ${stderr}`); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with us logging by default. I wonder if we should chose .error ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was warn in the unused code previously. I don't mind!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be for each line too, the console handles it much better.
warn instead of error makes sense as stderr could be used for all sorts really. |
Log per line of stderr
@damieng I've squashed the change down and I think we've addressed all the issues. Are there any further problems do you think? |
Remove Rls stderr logging code, upstreamed in atom/atom-languageclient#158
As discussed a little in #157 this PR adds stderr handling to a new public method:
Resolves #157