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

Improve logging #67

Closed
d-roak opened this issue Jul 29, 2024 · 12 comments
Closed

Improve logging #67

d-roak opened this issue Jul 29, 2024 · 12 comments
Assignees
Labels
external contributors Open for external contributors feature New feature or request

Comments

@d-roak
Copy link
Contributor

d-roak commented Jul 29, 2024

Currently we are using console.log and console.err for debugging. We want to create a debug mode where we can check logs, otherwise they shouldn't be displayed.

Research and implement the best approach you can find for this

@d-roak d-roak added feature New feature or request good first issue external contributors Open for external contributors labels Jul 29, 2024
@ghost ghost added this to DRP Jul 29, 2024
@github-project-automation github-project-automation bot moved this to Triage in DRP Jul 29, 2024
@d-roak d-roak changed the title feat: improve logging Improve logging Jul 29, 2024
@d-roak d-roak moved this from Triage to 🗃️ Backlog in DRP Aug 3, 2024
@JanLewDev
Copy link
Contributor

I'm on it.

@d-roak
Copy link
Contributor Author

d-roak commented Aug 26, 2024

done at #102 , needs further investigation on how to:

  • properly log nested objects without showing too much info
  • implement generic logging for types that throw errors

@d-roak d-roak removed the external contributors Open for external contributors label Sep 16, 2024
@gregemax
Copy link

gregemax commented Sep 19, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a strong background in TypeScript, specializing in creating efficient logging utilities. My experience will help implement a robust solution that enhances maintainability and debugging in our projects.

How I plan on tackling this issue

Define Debug Mode: Use an environment variable to toggle debug mode.

Create a Logger: Develop a TypeScript logger that wraps console.log and checks debug mode.

Integrate the Logger: Replace existing logging calls for consistency.

Testing: Ensure logs behave as expected in both modes.

Copy link

onlydustapp bot commented Sep 19, 2024

Hey @gregemax!
Thanks for showing interest.
We've created an application for you to contribute to Topology.
Go check it out on OnlyDust!

@d-roak
Copy link
Contributor Author

d-roak commented Sep 20, 2024

Go ahead! Assigned

@d-roak
Copy link
Contributor Author

d-roak commented Sep 24, 2024

Any further attempts, please check previous PRs for extra comments. One extra thing that was not mentioned in the last round of comments:

  • We want to be able to setup different log levels and configs to each package. The log configs should be passed in the constructor of each package

@d-roak
Copy link
Contributor Author

d-roak commented Sep 25, 2024

for tracking #172

@gregemax
Copy link

gregemax commented Oct 4, 2024

hey
consider a logger like winston or pino with browser-specific handling plugins for more control over object logging and nested data.

@d-roak
Copy link
Contributor Author

d-roak commented Oct 7, 2024

hey @gregemax, are you going to continue this task or can i drop the assignment and close the pr?

@gregemax
Copy link

gregemax commented Oct 7, 2024

@d-roak
should i use winston or pino for the logger

@d-roak
Copy link
Contributor Author

d-roak commented Oct 8, 2024

winston

@d-roak d-roak added external contributors Open for external contributors and removed good first issue labels Oct 14, 2024
@d-roak d-roak assigned winprn and unassigned gregemax Oct 28, 2024
@d-roak
Copy link
Contributor Author

d-roak commented Oct 28, 2024

assigning it internally

@d-roak d-roak closed this as completed Nov 6, 2024
@github-project-automation github-project-automation bot moved this from 🗃️ Backlog to 🏆 Done in DRP Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external contributors Open for external contributors feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants