index.js
function logCallback(cb, message) {
  var wrappedArgs = Array.prototype.slice.call(arguments);
  return function (err, data) {
    if (err) return cb(err);

    wrappedArgs.shift();
    console.log.apply(console, wrappedArgs);
    cb();
  }
}
function logCallback(cb, message) {
  var wrappedArgs = Array.prototype.slice.call(arguments);
  return function (err, data) {
    if (err) return cb(err);

    wrappedArgs.shift();
    console.log.apply(console, wrappedArgs);
    cb();
  }
}
function logCallback ( cb , message ) { var wrappedArgs = Array . prototype . slice . call ( arguments ) ; return function ( err , data ) { if ( err ) return cb ( err ) ; wrappedArgs . shift ( ) ; console . log . apply ( console , wrappedArgs ) ; cb ( ) ; } }
Executes the callback, but in case of success shows a message.
Also accepts extra arguments to pass to console.log.

Example:
logCallback(next, '% worked perfect', appName)

@param {Function} cb The callback to be called
@param {string} message The message to show if success
@returns {Function} The callback wrapped
Executes the callback but in case of success shows a message . Also accepts extra arguments to pass to console . log .