src/logger.js
function createGoal(type, goalName, params, opts) {
    opts = opts || {}
    opts.type = type
    var newGoalInstance = new Goal(goalName, params, opts)
    m.log('Starting '+goalName, {params: params}, {custom: {goalId: newGoalInstance.goalId}})
    var newGoal = m.context({
      goalInstance: newGoalInstance,
      name: goalName
    })

    return newGoal
  }
function createGoal(type, goalName, params, opts) {
    opts = opts || {}
    opts.type = type
    var newGoalInstance = new Goal(goalName, params, opts)
    m.log('Starting '+goalName, {params: params}, {custom: {goalId: newGoalInstance.goalId}})
    var newGoal = m.context({
      goalInstance: newGoalInstance,
      name: goalName
    })

    return newGoal
  }
m.query = _plugins['loggly'] ? _plugins['loggly'].query : function() { throw new Error('log.query() not available.  Load a plugin that supports it.') }