import { n as __reExport, t as __exportAll } from "./rolldown-runtime-BBjsoOtd.js";
import { destination } from "@adonisjs/logger";
//#region modules/logger.ts
var logger_exports = /* @__PURE__ */ __exportAll({ syncDestination: () => syncDestination });
import * as import__adonisjs_logger from "@adonisjs/logger";
__reExport(logger_exports, import__adonisjs_logger);
/**
* Creates a synchronous Pino Pretty stream for formatted log output.
*
* This function is specifically designed for testing and development environments
* where synchronous log output is preferred. By default, Pino uses asynchronous
* logging which can make it difficult to correlate logs with specific actions
* during debugging or testing.
*
* @param options - Configuration options for the pretty printer
*
* @example
* const loggerConfig = defineConfig({
*   default: 'app',
*   loggers: {
*     app: {
*       enabled: true,
*       name: env.get('APP_NAME'),
*       level: env.get('LOG_LEVEL'),
*       desination: !app.inProduction && (await syncDestination()),
*       transport: {
*         targets: [targets.file({ destination: 1 })],
*       },
*     },
*   }
* })
*
* @returns A promise that resolves to a PrettyStream instance
*/
async function syncDestination(options) {
	const { default: pinoPretty, isColorSupported } = await import("pino-pretty");
	return isColorSupported ? pinoPretty({
		...options,
		sync: true
	}) : destination(1);
}
//#endregion
export { syncDestination as n, logger_exports as t };
