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

Log Handler #301

Open
lucasbaesso opened this issue Jun 7, 2021 · 1 comment
Open

Log Handler #301

lucasbaesso opened this issue Jun 7, 2021 · 1 comment

Comments

@lucasbaesso
Copy link

Hello @westy92
Is it possible to add a log handler to the project?
Like this example:

  await Promise.all([
    Network.enable(),
    Page.enable(),
    Runtime.enable(),
    Log.enable()
  ]);
  if (options.clientLogHandler) {
    Log.entryAdded(options.clientLogHandler);
  }

Use case example:

var logHandler = (e) => {
  chromeLogger.debug(e.entry.source + ': ' + e.entry.text);
};

options.clientLogHandler = logHandler;

Chrome DevTools Log reference: https://chromedevtools.github.io/devtools-protocol/tot/Log/

@westy92
Copy link
Owner

westy92 commented Jun 17, 2021

Feel free to submit a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants