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

refactor: #184 Cleanup debug/log messages and styles #194

Merged
merged 10 commits into from
May 8, 2024

Conversation

TheRealAgentK
Copy link
Contributor

@TheRealAgentK TheRealAgentK commented May 6, 2024

refactor: #184 (Cleanup debug/log)

Description 📝

  • Purpose: Fixes Cleanup inconsistencies in logging/debug across SDK and examples #184 and cleans up inconsistent use and styles around debug and console.something() calls.
  • Approach: Unified tag prefixes in all debug/console statements, using different and appropriate tags for lib and sample apps. Changed to string literal templates where not done yet.

Type of change

Delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Updates

👉 All calls to debug now show the file the debug call was triggered by. This will help folks finding issues or going through the flow easier.
👉 Enabled RG4N debug messages to show in the Express Sample app (via the www launcher script)
👉 All console...() calls consistently track a prefix [Raygun4Node] (or similar for examples) now
👉 Changed console and debug calls to using string literal templates

Test plan 🧪

Internal refactor, npm run tests passes all and Express Sample app works correctly and as expected

Author to check 👓

  • Project and all contained modules builds successfully
  • Self-/dev-tested
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

Reviewer to check ✔️

  • Project and all contained modules builds successfully
  • Change has been dev-/reviewer-tested, where possible
  • Unit/UI/Automation/Integration tests provided where applicable
  • Code is written to standards
  • Appropriate documentation written (code comments, internal docs)

@@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "DEBUG=express-sample:server node ./bin/www"
"start": "DEBUG=raygun,express-sample:server node ./bin/www"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes raygun debug messages show up in the Express sample app.

@TheRealAgentK TheRealAgentK changed the title refactor: Cleanup debug/log messages and styles refactor: #184 Cleanup debug/log messages and styles May 6, 2024
Copy link
Collaborator

@sumitramanga sumitramanga left a comment

Choose a reason for hiding this comment

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

LGTM! 🎷

Copy link
Contributor

@miquelbeltran miquelbeltran left a comment

Choose a reason for hiding this comment

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

I saw a couple of code formatting issues.

The only doubt I have is when should we use debug and when should we use console.error or console.log.

Otherwise, this is good to go!

@sumitramanga
Copy link
Collaborator

sumitramanga commented May 7, 2024

Fixed up a merge conflict and implemented Miguel's changes. Feel free to pull down and test locally @TheRealAgentK

@TheRealAgentK TheRealAgentK merged commit ad719b4 into develop May 8, 2024
5 checks passed
@miquelbeltran miquelbeltran deleted the feature/#184-cleanup-debug-log branch May 17, 2024 05:30
@miquelbeltran miquelbeltran mentioned this pull request May 23, 2024
10 tasks
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.

Cleanup inconsistencies in logging/debug across SDK and examples
3 participants