lib/validator.js
function logfile(val) {
  var fd;
  // empty string disables use of log file
  if(val) {
    try {
      fd = fs.openSync(val, 'a');
      fs.closeSync(fd);
    }catch(e) {
      throw new Error(util.format('Can\'t open the log file: %s', val));
    }
  }
}
function logfile(val) {
  var fd;
  // empty string disables use of log file
  if(val) {
    try {
      fd = fs.openSync(val, 'a');
      fs.closeSync(fd);
    }catch(e) {
      throw new Error(util.format('Can\'t open the log file: %s', val));
    }
  }
}
function logfile ( val ) { var fd ; // empty string disables use of log file if ( val ) { try { fd = fs . openSync ( val , 'a' ) ; fs . closeSync ( fd ) ; } catch ( e ) { throw new Error ( util . format ( 'Can\'t open the log file: %s' , val ) ) ; } } }
Validate a logfile value.
Validate a logfile value .