node_modules/.cache/esm/e644b176f657bcfc.js
/**
   * Tracks the time inbetween subsequent calls to this method with the same
   * `id` parameter. The second call to this method will log the difference in
   * milliseconds along with the message.
   * @param {string} id Unique id of the profiler
   * @returns {Logger} - TODO: add return description.
   */
Tracks the time inbetween subsequent calls to this method with the same
`id` parameter. The second call to this method will log the difference in
milliseconds along with the message.
@param {string} id Unique id of the profiler
@returns {Logger} - TODO: add return description.
Tracks the time inbetween subsequent calls to this method with the same ` id ` parameter . The second call to this method will log the difference in milliseconds along with the message . @param { string } id Unique id of the profiler @returns { Logger } - TODO : add return description .
profile(id, ...args) {
    const time = Date.now();
    if (this.profilers[id]) {
      const timeEnd = this.profilers[id];
      delete this.profilers[id];
      if (typeof args[args.length - 2] === 'function') {
        _f65‍.g.console.warn('Callback function no longer supported as of winston@3.0.0');
        args.pop();
      }
      const info = typeof args[args.length - 1] === 'object' ? args.pop() : {};
      info.level = info.level || 'info';
      info.durationMs = time - timeEnd;
      info.message = info.message || id;
      return this.write(info);
    }
    this.profilers[id] = time;
    return this;
  }
profile ( id , ... args ) { const time = Date . now ( ) ; if ( this . profilers [ id ] ) { const timeEnd = this . profilers [ id ] ; delete this . profilers [ id ] ; if ( typeof args [ args . length - 2 ] === 'function' ) { _f65‍.g . c o nsole.w a rn(' C allback function no longer supported as of winston@3.0.0'); args . pop ( ) ; } const info = typeof args [ args . length - 1 ] === 'object' ? args . pop ( ) : { } ; info . level = info . level || 'info' ; info . durationMs = time - timeEnd ; info . message = info . message || id ; return this . write ( info ) ; } this . profilers [ id ] = time ; return this ; }
Tracks the time inbetween subsequent calls to this method with the same
 `id` parameter.
Tracks the time inbetween subsequent calls to this method with the same ` id ` parameter .
// Attempt to be kind to users if they are still using older APIs. // eslint-disable-next-line no-console // Set the duration property of the metadata