Subscribe to RSS Feed

ConsoleExport

ConsoleExport is a Firebug extension (you need Firebug 1.6+) that allows exporting logs from the Console panel.

Download latest ConsoleExport here

Report any issues or suggestions here

Export as HTML

Once the extension is installed there is a new Export button available in the Console panel toolbar. See the following screenshot.

If you pick the Save As menu a dialog appears and all you have to do is to choose proper place where to store your logs. It'll be stored a simple HTML file.

Known restriction:

  • The page is saved as a static HTML so, any dynamics such as expandable logs are not working when exported. If you want to export also content of expandable logs you need to expand them before export.

Send individual logs to the server

You can also activate an auto-export feature that is sending individual logs into specified server as XML packets.

The screenshot shows a button that is also available in the Console toolbar that is responsible for activation/deactivation of the feature.

A few notes:

  • The auto-export feature can be activated manually (by clicking on the toolbar button) as well as by setting a preference extensions.firebug.consoleexport.active. The preference is set to false by default (disabled). The user can set it before Firebug is started to automate activation.
  • Server URL must be specified in another preference extensions.firebug.consoleexport.serverURL (set to an empty string by default). Of course, the user needs to set this pref to make the export working.

Message format:

console.log("a simple log");
<log>
<class>log</class>
<cat>log</cat>
<msg>a simple log</msg>
<href>http://logs.html</href>
</log>
console.error("an error log");
<log>
<class>errorMessage</class>
<cat>error</cat>
<msg>an error log</msg>
<href>http:// logs.html</href>
<lineNo>36</lineNo>
<source>    console.error("an error log"); </source>
</log>

* The <source> element contains source of the with the log including white-spaces.

console.assert(false, "an assert");
<log>
<class>errorMessage</class>
<cat>assert</cat>
<msg>an assert</msg>
<href>http:// logs.html</href>
<lineNo>36</lineNo>
<source> console.error("an error log"); </source>
</log>
doesnotexist();
<log>
<class>errorMessage</class>
<cat>js</cat>
<msg>doesnotexist is not defined</msg>
<href><a href="http://logs.html/" target="_blank">http://logs.html</a></href>
<lineNo>32</lineNo>
</log>
console.info("an info log");
<log>
<class>info</class>
<cat>log</cat>
<msg>an info log</msg>
<href><a href="http://logs.html/" target="_blank">http://logs.html</a></href>
</log>

Possible Enhancements:

  • Upload is made using async XHR but there could be a preference for synchronous upload.

 

Related posts:

 

Initial development was sponsored by Kayako.
Doc translation to German provided by Robert.