Skip to content

Add full logging example #108

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

Open
vedantroy opened this issue Mar 23, 2021 · 2 comments
Open

Add full logging example #108

vedantroy opened this issue Mar 23, 2021 · 2 comments
Labels
question Further information is requested

Comments

@vedantroy
Copy link

Using

 let ctx = Context::builder().console(quick_js::console::LogConsole).build()?;

and later I evaluate some code that uses console.log, the code will run but nothing will be printed.

@theduke
Copy link
Owner

theduke commented Mar 24, 2021

Hey.

The provided logger uses the log crate, which doesn't print anything by default.

You will have to enable a logging backend.

env-logger is a popular choice.

@theduke theduke closed this as completed Mar 24, 2021
@theduke theduke added the question Further information is requested label Mar 24, 2021
@theduke theduke changed the title Nothing is printed when using console backend Add full logging example Mar 25, 2021
@theduke
Copy link
Owner

theduke commented Mar 25, 2021

We should probably add a full example that demonstrates logging.

@theduke theduke reopened this Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants