From 943c2d327a4fa3896dc1960a9e67997732efe3a0 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Thu, 28 Apr 2022 09:54:39 +0200 Subject: [PATCH] Add logging to cross-browser example Issue: #110 --- examples/cross-browser.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/cross-browser.py b/examples/cross-browser.py index 194accee9c..d56aa51c43 100644 --- a/examples/cross-browser.py +++ b/examples/cross-browser.py @@ -16,13 +16,19 @@ # This script implements Puppeteer's `examples/cross-browser.js` scenario using WebDriver BiDi. # https://github.com/puppeteer/puppeteer/blob/4c3caaa3f99f0c31333a749ec50f56180507a374/examples/cross-browser.js +from pathlib import Path import asyncio import json +import logging import os import websockets -from pathlib import Path +logging.basicConfig( + format="%(message)s", + level=logging.DEBUG, +) + async def get_websocket(): port = os.getenv('PORT', 8080) url = f'ws://localhost:{port}/session'