From c7ced48735a9835be0591d5144eb42965b225bbb Mon Sep 17 00:00:00 2001 From: Pringgo Radianto Date: Tue, 1 Oct 2024 14:33:53 +0700 Subject: [PATCH] style(logger): add proxy name to logger --- src/runtime/server/plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/server/plugin.ts b/src/runtime/server/plugin.ts index 1c27fc6..e0c6668 100644 --- a/src/runtime/server/plugin.ts +++ b/src/runtime/server/plugin.ts @@ -39,10 +39,10 @@ export default defineNitroPlugin(async ({ router }) => { router.use(config.baseUrl, handler) router.use(`${config.baseUrl}/**`, handler) - logger.success(`Proxy successfully created: ${config.baseUrl} -> ${config.target}`) + logger.success(`(${config.name || 'no name'})`, `Proxy successfully created: ${config.baseUrl} -> ${config.target}`) } else { - logger.warn(`Skipping creation of proxy for "${config.baseUrl}" due to missing target`) + logger.warn(`(${config.name || 'no name'})`, `Skipping creation of proxy for "${config.baseUrl}" due to missing target`) } }) }