See this thread. (Not an exact duplicate, but related).
I haven't found a way to read the console output, but if all you're interested in is capturing your ::log() messages, you can override the .log() method, or create your own which would write your log messages another container, and then call .log().
var myLogStr='';
function myLog(str)
{
if(console) console.log(str);
myLogString+=str+'\n';
}
Of course, all of the Firebug objects ( console, etc) exist in the DOM, so you could track down the ID of the console window and retrieve the contents directly.
Update
Firebug also offers some events that you can hook into, which may provide a way to intercept errors, etc.