'use strict';

var index = require('../../_virtual/index9.js');
var format$1 = require('./format.js');
var levels = require('./levels.js');
var align = require('./align.js');
var errors = require('./errors.js');
var cli = require('./cli.js');
var combine = require('./combine.js');
var colorize = require('./colorize.js');
var json = require('./json.js');
var label = require('./label.js');
var logstash = require('./logstash.js');
var metadata = require('./metadata.js');
var ms = require('./ms.js');
var padLevels = require('./pad-levels.js');
var prettyPrint = require('./pretty-print.js');
var printf = require('./printf.js');
var simple = require('./simple.js');
var splat = require('./splat.js');
var timestamp = require('./timestamp.js');
var uncolorize = require('./uncolorize.js');

/*
 * @api public
 * @property {function} format
 * Both the construction method and set of exposed
 * formats.
 */
const format = index.__exports.format = format$1.format;

/*
 * @api public
 * @method {function} levels
 * Registers the specified levels with logform.
 */
index.__exports.levels = levels.levels;

/*
 * @api private
 * method {function} exposeFormat
 * Exposes a sub-format on the main format object
 * as a lazy-loaded getter.
 */
function exposeFormat(name, requireFormat) {
  Object.defineProperty(format, name, {
    get() {
      return requireFormat();
    },
    configurable: true
  });
}

//
// Setup all transports as lazy-loaded getters.
//
exposeFormat('align', function () { return align.__require(); });
exposeFormat('errors', function () { return errors.__require(); });
exposeFormat('cli', function () { return cli.__require(); });
exposeFormat('combine', function () { return combine.__require(); });
exposeFormat('colorize', function () { return colorize.__require(); });
exposeFormat('json', function () { return json.__require(); });
exposeFormat('label', function () { return label.__require(); });
exposeFormat('logstash', function () { return logstash.__require(); });
exposeFormat('metadata', function () { return metadata.__require(); });
exposeFormat('ms', function () { return ms.__require(); });
exposeFormat('padLevels', function () { return padLevels.__require(); });
exposeFormat('prettyPrint', function () { return prettyPrint.__require(); });
exposeFormat('printf', function () { return printf.__require(); });
exposeFormat('simple', function () { return simple.__require(); });
exposeFormat('splat', function () { return splat.__require(); });
exposeFormat('timestamp', function () { return timestamp.__require(); });
exposeFormat('uncolorize', function () { return uncolorize.__require(); });

module.exports = index.__exports;
