MCPcopy Create free account
hub / github.com/TanStack/router / createLogger

Function createLogger

packages/start-plugin-core/src/utils.ts:24–33  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

22}
23
24export function createLogger(prefix: string) {
25 const label = `[${prefix}]`
26 return {
27 log: (...args: any) => console.log(label, ...args),
28 debug: (...args: any) => console.debug(label, ...args),
29 info: (...args: any) => console.info(label, ...args),
30 warn: (...args: any) => console.warn(label, ...args),
31 error: (...args: any) => console.error(label, ...args),
32 }
33}
34
35function slash(path: string): string {
36 return path.replace(windowsSlashRE, '/')

Callers 2

prerenderFunction · 0.90
buildSitemapFunction · 0.90

Calls 5

logMethod · 0.65
debugMethod · 0.65
infoMethod · 0.65
warnMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected