I\'m looking for a way to read the most recent command that was logged to the firebug console.
For example, I could have something that does
console.
You could overwrite the console.log function to add whatever extra functionality you need.
var oldLog = console.log;
var lastLog;
console.log = function () {
// do whatever you need to do here: store the logs into a different variable, etc
// eg:
lastLog = arguments;
// then call the regular log command
oldLog.apply(console, arguments);
};
This won't be the most bulletproof solution, since console allows printf style syntax:
console.log("%d + %d = %s", 1, 3, "four");
...but it's probably a start for you.