Safely using console.* in browser
I don't see any problems with that. It's similar to this answer on SO.

Just a couple minor things:


You don't need args in the empty log function
You should make the entire function anonymous and execute it immediately (as it's being done in the answer I linked to); I don't think there's any usecase for calling it otherwise
Don't forget var in front of the i variable, otherwise it becomes global