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: introduce logging [sc-22304] #978

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sorccu
Copy link
Collaborator

@sorccu sorccu commented Nov 11, 2024

While this PR is intended to eventually introduce permanent logging to the CLI, for now its purpose is to help us debug a certain customer issue. As such some cleanup will be needed before this can merged for real.

I hereby confirm that I followed the code guidelines found at engineering guidelines

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

Notes for the Reviewer

Resolves #[issue-number]

New Dependency Submission

A new dependency to pino is introduced. I also debated going with winston but pino seems to have a reputation for being somewhat faster, and it has slightly fewer dependencies.

In its current configuration, the logger outputs lines of structured JSON to
a file called `checkly.debug.log` in the current directory. This will change
later.

By default, logs are silenced. Only when you set CHECKLY_LOG_LEVEL, does the
log file actually receive any content.
Although the logging is going to be fairly excessive especially for larger
projects, this should hopefully be enough to give us at least some clue
about the ongoing 408 issues with certain projects.
@sorccu sorccu added the build Issue regarding building and packaging label Nov 11, 2024
Copy link

🎉 Experimental release successfully published on npm

npm install [email protected]

@sorccu sorccu marked this pull request as draft December 6, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issue regarding building and packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant