Closed petzi75 closed 3 years ago
What are the logs?
I`ve added this command now: logging.getLogger('seleniumwire').level = logging.INFO reduces the amount a little bit - so no DEBUGS with 127.0...... are listening anymore.
but also hundreds per each second like this: 2021-07-19 21:44:55 DEBUG: Resizing header table to 65536 from 4096 2021-07-19 21:44:55 DEBUG: Decoded 2, consumed 1 bytes 2021-07-19 21:44:55 DEBUG: Decoded (b':method', b'POST'), consumed 1 2021-07-19 21:44:55 DEBUG: Decoded 2, consumed 1 bytes 2021-07-19 21:44:55 DEBUG: Decoded (b':method', b'GET'), consumed 1 2021-07-19 21:44:55 DEBUG: Decoded 1, consumed 1 bytes 2021-07-19 21:44:55 DEBUG: Decoded (b':method', b'GET'), consumed 1 2021-07-19 21:44:55 DEBUG: Adding (b'origin', b'https://www.google.com') to the header table, sensitive:False, huffman:True 2021-07-19 21:44:55 DEBUG: Encoding 5 with 7 bits 2021-07-19 21:44:55 DEBUG: Encoding 16 with 7 bits 2021-07-19 21:44:55 DEBUG: Adding (b'content-type', b'application/x-www-form-urlencoded') to the header table, sensitive:False, huffman:True 2021-07-19 21:44:55 DEBUG: Encoding 31 with 6 bits 2021-07-19 21:44:55 DEBUG: Encoding 24 with 7 bits 2021-07-19 21:44:55 DEBUG: Adding (b'sec-fetch-site', b'none') to the header table, sensitive:False, huffman:True 2021-07-19 21:44:55 DEBUG: Encoding 10 with 7 bits 2021-07-19 21:44:55 DEBUG: Encoding 3 with 7 bits
Have you tried logging.getLogger('root').setLevel(logging.INFO)
?
doesn`t help - this brings also the 127.0.... messages back anyway, I have switched back to pure uc and using now the cdp listener function - this works :)
@petzi75 I use selenium-wire with undetected_chromedriver and don't have that logging issues (and I use logging in INFO level), but I use v1, not v2.
The log messages are coming out of the hpack library which is used in the background for encoding and decoding HTTP/2 data. The messages are debug level, so something in the script/application must have initialised logging at DEBUG level for these to show up. The messages can be silenced by lowering the log level to INFO or lower for just 'hpack' or the whole script/application (as @HMaker suggests). Alternatively, you can disable HTTP/2 by passing mitm_http2: False
in your seleniumwire_options, but reducing the log level would be the better approach.
it works, but I get thousends of DEBUG loggings if I import the v2 over selenium-wire package Direct from uc, where I used before, there are no debug loggs How can I disable this please? I couldn`t find any information about...