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

Replace console.log #84

Open
inluxc opened this issue Nov 18, 2024 · 12 comments · May be fixed by #88
Open

Replace console.log #84

inluxc opened this issue Nov 18, 2024 · 12 comments · May be fixed by #88
Assignees

Comments

@inluxc
Copy link
Owner

inluxc commented Nov 18, 2024

Is your feature request related to a problem? Please describe.
We need an alternative to console.log in the project so we don't have to repeat the code.

Describe the solution you'd like
Generate 2 new methods:

  • stdout - to output to console
  • logs - to save to file, Prometheus or OpenTelemetry
@Niklas-Back
Copy link
Contributor

I can look at it

@NiklasBack NiklasBack self-assigned this Nov 21, 2024
@NiklasBack
Copy link
Collaborator

Perhaps we could include log4js for the logs?

@inluxc
Copy link
Owner Author

inluxc commented Nov 25, 2024

We could add something like this.

https://github.com/empirical-run/appwright/blob/main/src/logger.ts

For the stdout

@inluxc inluxc linked a pull request Nov 27, 2024 that will close this issue
@Niklas-Back
Copy link
Contributor

If we use log4ts, should we store the configuration in playwright.config or in a separate file?

@inluxc
Copy link
Owner Author

inluxc commented Dec 10, 2024

@Niklas-Back
Copy link
Contributor

I'm uncertain what to use. Initially I was thinking of Apache Logging Services but I just realized that there is nothing for ts/js so should I instead perhaps look at Prometheus or OpenTelemetry?

@Niklas-Back
Copy link
Contributor

Niklas-Back commented Dec 11, 2024

Perhaps this one: https://www.npmjs.com/package/log4js Seams to have several appenders. Also several contributors

@inluxc
Copy link
Owner Author

inluxc commented Dec 11, 2024

Yep that looks pretty cool 👍 @Niklas-Back

@Niklas-Back
Copy link
Contributor

In fact we could handle all logging with this, we just need to add appenders

@Niklas-Back
Copy link
Contributor

I'll start with this based on your concept in pr #88 as soon as the branch of csvtuda is merged

@inluxc
Copy link
Owner Author

inluxc commented Dec 13, 2024 via email

@Niklas-Back
Copy link
Contributor

Sorry, been too busy lately but I will start to look at it after next release

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 a pull request may close this issue.

3 participants