Firebug is certainly a wonderful tool for javascript debugging; I use console.log() extensively.
I wanted to know if I can leave the Firebug-specific code in production.
You can try JavaScript Debug, it is s simple wrapper for console.log http://benalman.com/projects/javascript-debug-console-log/