"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.LaunchDarklyLogger = void 0;

var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));

var _bunyan = _interopRequireDefault(require("bunyan"));

var _bunyanFormat = _interopRequireDefault(require("bunyan-format"));

var _dotenv = _interopRequireDefault(require("dotenv"));

_dotenv["default"].config();

var level = process.env.LAUNCHDARKLY_API_LOGLEVEL || 'info';

var LOG = _bunyan["default"].createLogger({
  level: level,
  name: 'ldu',
  streams: [{
    stream: (0, _bunyanFormat["default"])({
      outputMode: 'short'
    })
  }]
});
/**
 * @class
 */


var LaunchDarklyLogger = /*#__PURE__*/function () {
  function LaunchDarklyLogger() {
    (0, _classCallCheck2["default"])(this, LaunchDarklyLogger);
  }

  (0, _createClass2["default"])(LaunchDarklyLogger, null, [{
    key: "logger",
    value:
    /**
     * Get handle on Bunyan logger.  This is the default logger if not supplied to utils.
     * @returns {Logger}
     */
    function logger() {
      return LOG;
    }
  }]);
  return LaunchDarklyLogger;
}();

exports.LaunchDarklyLogger = LaunchDarklyLogger;