I guess if you really wanted to you could stash a reference to the original console object and replace it with an object which has the same methods, but are no-ops. Then in your code use the original console object.
You would likely need to add global error and unhandled promise rejection event listeners so that any errors wouldn't be printed to the log.
This is likely to be pretty brittle. Things like failed network requests get printed to the log even if they are caught, and it won't intercept any logs from web workers. But it might work for your project. If not you might want to consider making a fake console window for your game.