Re: Help on writing extension: Is it possible to get the console output via API?

13 views
Skip to first unread message

Jan Honza Odvarko

unread,
Mar 25, 2013, 9:19:03 AM3/25/13
to Firebug
On Mar 24, 7:39 pm, ryanchan...@gmail.com wrote:
> Actually maybe just a simple question: Is it possible to get the console
> output using API? e.g. Erros, Warnings, Info etc
Yes

Take a look at this extension:
https://github.com/firebug/consoleexport

Specifically at this code:
https://github.com/firebug/consoleexport/blob/master/chrome/content/consoleexport/consoleListener.js#L27

You can register a console listener and intercepts logs:

You are mostly interested in 'log' and 'logFormatted' calls I guess.

Honza
Reply all
Reply to author
Forward
0 new messages