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

Runme logging in output channel #521

Merged
merged 10 commits into from May 19, 2023
Merged

Runme logging in output channel #521

merged 10 commits into from May 19, 2023

Conversation

christian-bromann
Copy link
Contributor

fixes #454

This is a simple patch that makes Runme log into an dedicated output channel. I kept it intentionally simple for now as we don't know yet many requirements for our logging. For now, this gives us a central point/module to handle logging. I looked into existing logging package which all seem overkill and came with some issues, e.g. @vscode-logging/logger would print out a JSON blog rather than a simple log line.

Something I would have liked to address but is not possible at the moment:

@mxsdev would this prevent the error reported in the original issue to happen again?

Demo:
Screenshot 2023-05-17 at 16 59 09

Interface:

import getLogger from './logger'

const log = getLogger('someScope')
log.info('I am an info message')
log.error('I am an error message')

Copy link
Contributor

@mxsdev mxsdev left a comment

Choose a reason for hiding this comment

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

I've been wanting this for months 🤩 thank you for doing this!

src/extension/logger.ts Outdated Show resolved Hide resolved
src/extension/logger.ts Outdated Show resolved Hide resolved
src/extension/survey.ts Outdated Show resolved Hide resolved
src/extension/survey.ts Outdated Show resolved Hide resolved
src/extension/logger.ts Show resolved Hide resolved
src/extension/logger.ts Outdated Show resolved Hide resolved
src/extension/index.ts Outdated Show resolved Hide resolved
christian-bromann and others added 5 commits May 18, 2023 19:57
Co-authored-by: Max Stoumen <max@mxs.dev>
Co-authored-by: Max Stoumen <max@mxs.dev>
Co-authored-by: Max Stoumen <max@mxs.dev>
Co-authored-by: Max Stoumen <max@mxs.dev>
@christian-bromann
Copy link
Contributor Author

Addressed comments and fixed tests.

Copy link
Contributor

@mxsdev mxsdev left a comment

Choose a reason for hiding this comment

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

LGTM

@christian-bromann
Copy link
Contributor Author

Screenshot 2023-05-18 at 11 14 23

Copy link
Contributor

@mxsdev mxsdev left a comment

Choose a reason for hiding this comment

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

Forgot to mention one last thing!

src/extension/logger.ts Outdated Show resolved Hide resolved
@christian-bromann christian-bromann merged commit 7533440 into main May 19, 2023
3 checks passed
@christian-bromann christian-bromann deleted the cb-logging branch May 19, 2023 20:44
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.

Send logs to VS Code output channel
2 participants