import { t as Logger } from "../logger-DFa9WtFu.js";
import { Writable } from "node:stream";
function getFakeStream(fn) {
	const stream = new Writable();
	stream.write = fn;
	return stream;
}
var LoggerFactory = class {
	#options = {};
	#logsCollection;
	pushLogsTo(collection) {
		this.#logsCollection = collection;
		return this;
	}
	merge(options) {
		Object.assign(this.#options, options);
		return this;
	}
	create() {
		if (this.#logsCollection) this.#options.destination = getFakeStream((message) => {
			this.#logsCollection.push(message.trim());
			return true;
		});
		return new Logger(this.#options);
	}
};
export { LoggerFactory };
