log (severity, elements) { // eslint-disable-line no-unused-vars
    if (!this._severities.hasOwnProperty(severity)) {
      throw new Error(`Severity ${severity} does not exist.`)
    }
    const args = Array.prototype.slice.call(arguments)
    const logTime = new Date()
    const objArgs = {}
    const logElems = []
    // Remove the severity arg and put metadata first, all in one fell swoop
    args[0] = logUtil.safeMerge(this._getOrigin(), this._getGlobals())
    for (let i = 0; i < args.length; i++) {
      const arg = this._transform(args[i])
      if (typeof arg === 'object' && !(arg instanceof Error) && !(arg instanceof Date)) {
        logUtil.safeMerge(objArgs, arg)
      } else {
        logElems.push(arg)
      }
    }
    logElems.push(objArgs)
    this._targets.forEach((target) => {
      this._logToTarget(target, severity, logTime, logElems)
    })
    const eventObj = {
      severity: severity,
      date: logTime,
      elements: logElems
    }
    this.emit('log', eventObj)
    this.emit('log:' + severity, eventObj)
  }
/**
   * Pushes the provided elements to each added target, under the given severity.
   * Only targets that have not been restricted against this severity or type
   * of element will be triggered.  The given elements can be of any type, as
   * long as there is a transform to handle it or the target's formatter can
   * sufficiently serialize it.
   *
   * This function emits two events:
   *   - log : fired for every call to the logger, immediately after the log
   *     elements are pushed to the targets.  The supplied argument will have
   *     the following properties:
   *       - {string} severity: The severity under which the elements were
   *         logged
   *       - {Date} date: A javascript Date object with the date under which
   *         the messages were logged
   *       - {Array} elements: An array of elements that were logged.  These
   *         elements could be of any type
   *   - log:SEVERITY : fired for every call to the logger, with 'SEVERITY'
   *     replaced by the actual severity used for the log message.  Argument
   *     is the same as for the 'log' event.
   * @param {string} severity A string defining the severity of the log message.
   *      This string should be one of the set passed to {@link #setSeverities},
   *      or one from the default set of ['error', 'warn', 'info', 'debug',
   *      'trace'] if that function was not called.
   * @param {...*} elements One or more elements of any type to be logged
   */
Pushes the provided elements to each added target, under the given severity.
Only targets that have not been restricted against this severity or type
of element will be triggered.  The given elements can be of any type, as
long as there is a transform to handle it or the target's formatter can
sufficiently serialize it.

This function emits two events:
- log : fired for every call to the logger, immediately after the log
elements are pushed to the targets.  The supplied argument will have
the following properties:
- {string} severity: The severity under which the elements were
logged
- {Date} date: A javascript Date object with the date under which
the messages were logged
- {Array} elements: An array of elements that were logged.  These
elements could be of any type
- log:SEVERITY : fired for every call to the logger, with 'SEVERITY'
replaced by the actual severity used for the log message.  Argument
is the same as for the 'log' event.
@param {string} severity A string defining the severity of the log message.
Pushes the provided elements to each added target under the given severity . Only targets that have not been restricted against this severity or type of element will be triggered . The given elements can be of any type as long as there is a transform to handle it or the target ' s formatter can sufficiently serialize it . This function emits two events : - log : fired for every call to the logger immediately after the log elements are pushed to the targets . The supplied argument will have the following properties : - { string } severity : The severity under which the elements were logged - { Date } date : A javascript Date object with the date under which the messages were logged - { Array } elements : An array of elements that were logged . These elements could be of any type - log : SEVERITY : fired for every call to the logger with ' SEVERITY ' replaced by the actual severity used for the log message . Argument is the same as for the ' log ' event . @param { string } severity A string defining the severity of the log message .
log (severity, elements) { 
    if (!this._severities.hasOwnProperty(severity)) {
      throw new Error(`Severity ${severity} does not exist.`)
    }
    const args = Array.prototype.slice.call(arguments)
    const logTime = new Date()
    const objArgs = {}
    const logElems = []
    args[0] = logUtil.safeMerge(this._getOrigin(), this._getGlobals())
    for (let i = 0; i < args.length; i++) {
      const arg = this._transform(args[i])
      if (typeof arg === 'object' && !(arg instanceof Error) && !(arg instanceof Date)) {
        logUtil.safeMerge(objArgs, arg)
      } else {
        logElems.push(arg)
      }
    }
    logElems.push(objArgs)
    this._targets.forEach((target) => {
      this._logToTarget(target, severity, logTime, logElems)
    })
    const eventObj = {
      severity: severity,
      date: logTime,
      elements: logElems
    }
    this.emit('log', eventObj)
    this.emit('log:' + severity, eventObj)
  }
log ( severity , elements ) { if ( ! this . _severities . hasOwnProperty ( severity ) ) { throw new Error ( ` ${ severity } ` ) } const args = Array . prototype . slice . call ( arguments ) const logTime = new Date ( ) const objArgs = { } const logElems = [ ] args [ 0 ] = logUtil . safeMerge ( this . _getOrigin ( ) , this . _getGlobals ( ) ) for ( let i = 0 ; i < args . length ; i ++ ) { const arg = this . _transform ( args [ i ] ) if ( typeof arg === 'object' && ! ( arg instanceof Error ) && ! ( arg instanceof Date ) ) { logUtil . safeMerge ( objArgs , arg ) } else { logElems . push ( arg ) } } logElems . push ( objArgs ) this . _targets . forEach ( ( target ) => { this . _logToTarget ( target , severity , logTime , logElems ) } ) const eventObj = { severity : severity , date : logTime , elements : logElems } this . emit ( 'log' , eventObj ) this . emit ( 'log:' + severity , eventObj ) }
Pushes the provided elements to each added target, under the given severity.
Pushes the provided elements to each added target under the given severity .
// eslint-disable-line no-unused-vars // Remove the severity arg and put metadata first, all in one fell swoop