Skip to content

Commit

Permalink
Merge pull request #21137 from storybookjs/norbert/remove-statics-log…
Browse files Browse the repository at this point in the history
…ging

CLI: Filter out internal static dir logging
  • Loading branch information
shilman committed Mar 9, 2023
2 parents f1c17fc + efecf53 commit 03b1e95
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions code/lib/core-server/src/utils/server-statics.ts
Expand Up @@ -42,9 +42,14 @@ export async function useStatics(router: any, options: Options) {
})
: dir;
const { staticDir, staticPath, targetEndpoint } = await parseStaticDir(relativeDir);
logger.info(
chalk`=> Serving static files from {cyan ${staticDir}} at {cyan ${targetEndpoint}}`
);

// Don't log for the internal static dir
if (!targetEndpoint.startsWith('/sb-')) {
logger.info(
chalk`=> Serving static files from {cyan ${staticDir}} at {cyan ${targetEndpoint}}`
);
}

router.use(targetEndpoint, express.static(staticPath, { index: false }));
} catch (e) {
logger.warn(e.message);
Expand Down

0 comments on commit 03b1e95

Please sign in to comment.