code: function (opts, baseMeta) {
      // Stash singleton logger for all requests.
      var singleton = new winston.Logger(opts);
      var meta = _.extend({ type: "unhandled_error" }, baseMeta);
  
      return function (err) {
        try {
          // Try real logger.
          return (new Log(_.extend({ singleton: singleton }, opts), meta))
            .addError(err)
            .error("Uncaught exception");
  
        } catch (other) {
          // Else, give up and use straight console logging.
          console.log((err || {}).stack || err || "Unknown");
          console.log("Error: Hit additional error logging the previous error.");
          console.log((other || {}).stack || other || "Unknown");
          return;
  
        } finally {
          process.exit(1);
        }
      };
    }
docs: `uncaught(opts, baseMeta)` - Global uncaught exception handler
  
  Creates a handler function for any uncaught exception. Integration:
  
  ```
  process.on("uncaughtException", winMid.uncaught({
  transports: [ new (winston.transports.Console)({ json: true }) ]
  }, { foo: "bar" }));
  ```
  
  **Note**: Terminates process at end.
  
  @param {Object} opts     Winston logger options.
  @param {Object} baseMeta Metadata for log statements.
  @api public