index.js
function getSourceInfo() {
  var exec = getStack()[3];

  var pos = exec.getFileName().lastIndexOf('\\');
  if(pos < 0) exec.getFileName().lastIndexOf('/');

  return {
    methodName: exec.getFunctionName() || 'anonymous',
    file: exec.getFileName().substring(pos + 1),
    lineNumber: exec.getLineNumber()
  };
}
function getSourceInfo() {
  var exec = getStack()[3];

  var pos = exec.getFileName().lastIndexOf('\\');
  if(pos < 0) exec.getFileName().lastIndexOf('/');

  return {
    methodName: exec.getFunctionName() || 'anonymous',
    file: exec.getFileName().substring(pos + 1),
    lineNumber: exec.getLineNumber()
  };
}
function getSourceInfo ( ) { var exec = getStack ( ) [ 3 ] ; var pos = exec . getFileName ( ) . lastIndexOf ( '\\' ) ; if ( pos < 0 ) exec . getFileName ( ) . lastIndexOf ( '/' ) ; return { methodName : exec . getFunctionName ( ) || 'anonymous' , file : exec . getFileName ( ) . substring ( pos + 1 ) , lineNumber : exec . getLineNumber ( ) } ; }
Gets the source information from the line being log
Gets the source information from the line being log