"use strict";

const debug = require("debug");

module.exports = function createDebuggers(optimizers) {
	let debuggers = {};

	for (let optimizer of optimizers) {
		debuggers[optimizer.name] = debug(`raqb:ast:optimize:${optimizer.name}`);
		debuggers[`${optimizer.name} (deferred)`] = debug(`raqb:ast:optimize:${optimizer.name} (deferred)`);
	}

	debuggers["(subtree change)"] = debug(`raqb:ast:optimize:(subtree change)`);

	return debuggers;
};
