Is there a way in JavaScript to listen console events?

前端 未结 6 2417
悲&欢浪女
悲&欢浪女 2020-12-05 04:53

I\'m trying to write handler for uncaught exceptions and browser warnings in Javascript. All errors and warnings should be sent to server for later review.

Handled e

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 05:32

    I needed to debug console output on mobile devices so I built this drop-in library to capture console output and category and dump it to the page. Check the source code, it's quite straightforward.

    https://github.com/samsonradu/Consolify

提交回复
热议问题