dist/fhlog.js
/**
 * @public
 * @constructor
 * Creates a log instance with data required to log a string.
 */
@public
@constructor
Creates a log instance with data required to log a string.
@public @constructor Creates a log instance with data required to log a string .
function Log (opts, args) {
  args = Array.prototype.slice.call(args);
  var ts = Date.now()
    , lvlStr = getLevelStr(opts)
    , prefix = ''
    , name = opts.name;
  this.text = util.format.apply(util, args);
  prefix = util.format('%s %s %s: ', new Date(ts).toJSON(), lvlStr, name);
  if (typeof args[0] === 'string') {
    args[0] = prefix + args[0];
  }
  this.formattedText = util.format.apply(util, args);
  this.ts = ts;
  this.level = opts.level;
  this.name = name;
}
function Log ( opts , args ) { args = Array . prototype . slice . call ( args ) ; var ts = Date . now ( ) , lvlStr = getLevelStr ( opts ) , prefix = '' , name = opts . name ; this . text = util . format . apply ( util , args ) ; prefix = util . format ( '%s %s %s: ' , new Date ( ts ) . toJSON ( ) , lvlStr , name ) ; if ( typeof args [ 0 ] === 'string' ) { args [ 0 ] = prefix + args [ 0 ] ; } this . formattedText = util . format . apply ( util , args ) ; this . ts = ts ; this . level = opts . level ; this . name = name ; }
@public
 @constructor
 Creates a log instance with data required to log a string.
@public @constructor Creates a log instance with data required to log a string .
// Set text to be just the text user supplied // Build log prefix // Normalise first arg to a include our string if necessary // Set text to be just the text user supplied // Format the string so we can save it and output it correctly