There’s also another option called drop_console which has been added recently (late 2013)
drop_console -- default false. Pass true to discard calls to console.* functions
This is added to the grunt init config like this:
grunt.initConfig({
uglify: {
options: {
compress: {
drop_console: true // <-
}
},
my_target: {
files: {
'dest/output.min.js': ['src/input.js']
}
}
}
});
As taken from the grunt-contrib-uglify github documents