ulixee / hero

The web browser built for scraping
MIT License
652 stars 32 forks source link

[Question] How can I disable the logger ? #145

Closed Baker68 closed 1 year ago

Baker68 commented 1 year ago

I got a log of this :

CaptureWebsocketMessageError.UnregisteredResource {
  event: {
    resourceId: undefined,
    message: 'something',
    isFromServer: true,
    lastCommandId: 4,
    timestamp: 1661695335885.463
  },
  context: { sessionId: '_tShQs1NKdCzPBzVd04dU' },
  sessionId: '_tShQs1NKdCzPBzVd04dU',
  sessionName: 'default-session'
}

and some messages are very long ; How can I disabled the logger or UnregisteredResource ?

Settings process.env.DEBUG = 'false'; or process.env.ULX_DEBUG = 'false' dose nothing and I am using disableMitm: true;

Thanks in advance.

blakebyrnes commented 1 year ago

Thanks for reporting. We'll need a code change to disable that message. I hope you've seen in some places, but disableMitm is NOT a very stable feature. It was added at the request of a user, but before that was mostly used internally to workaround occasional issues with the MITM or for narrowing down why we were getting block

blakebyrnes commented 1 year ago

Fixed in 2.0.0-alpha.11