Skip to content

Add TypeScript server logs for exceptions #38

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

Merged
merged 5 commits into from
Aug 26, 2019
Merged

Add TypeScript server logs for exceptions #38

merged 5 commits into from
Aug 26, 2019

Conversation

dagda1
Copy link
Contributor

@dagda1 dagda1 commented Aug 16, 2019

Resolves #36.

The logger gets passed in with the info object in the language service create function which is a bit annoying so you need to pass it to any function needing it.

I've wrapped it in a very simple LanguageServiceLogger.

I've also maybe controversially changed cssSnapshots.ts from functions into a class with the only reason being, that I don't have to pass the Logger to any function that requires it. Could change it back.

@mrmckeb
Copy link
Owner

mrmckeb commented Aug 18, 2019

@dagda1, this is great - thanks. There are a few things I'd change, but I don't have a lot of time and as they're stylistic things, I think it's better to merge this and release, and I can just make the changes at a later date.

I'll get @lianapache to review too, and then we can merge and release.

@mrmckeb
Copy link
Owner

mrmckeb commented Aug 18, 2019

Also, on a side note, it looks like the email address you have configured locally hasn't been added to GitHub.

image

@mrmckeb mrmckeb requested a review from lianapache August 18, 2019 18:39
@mrmckeb mrmckeb self-assigned this Aug 18, 2019
@dagda1
Copy link
Contributor Author

dagda1 commented Aug 18, 2019

@mrmckeb I'm always interested in feedback if you have time, even if it is stylistic. Thanks for the shout out about the email, I recently deleted an old google account that was in my git.config.

@mrmckeb mrmckeb changed the title create Logger for writing exceptions to the ts server log Add TypeScript server logs for exceptions Aug 18, 2019
@dagda1
Copy link
Contributor Author

dagda1 commented Aug 24, 2019

@mrmckeb is the PR good to go?

@mrmckeb
Copy link
Owner

mrmckeb commented Aug 24, 2019

Yes, thanks! I plan to merge and release tomorrow.

@mrmckeb
Copy link
Owner

mrmckeb commented Aug 26, 2019

I know you asked for feedback too - it was stylistic in the sense that we try to keep a functional-approach in this package, but that was all. Thanks for the contribution!

@mrmckeb mrmckeb merged commit 143b7ea into mrmckeb:develop Aug 26, 2019
@mrmckeb
Copy link
Owner

mrmckeb commented Aug 26, 2019

You can install this with the beta tag (@beta) or as 1.3.0-beta.0 - this should be released properly in the coming days. Again, apologies, I'm in travel right now and literally published from a train.

@dagda1
Copy link
Contributor Author

dagda1 commented Aug 26, 2019

@mrmckeb no apologies necessary, thank you for creating this as it is something I have been wanting to do

@dagda1 dagda1 deleted the pc/logging branch August 26, 2019 15:30
@mrmckeb
Copy link
Owner

mrmckeb commented Sep 18, 2019

This is now in 1.3.1 (out of beta). Thanks again!

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.

tsserver logging
3 participants