MCPcopy Create free account
hub / github.com/modelcontextprotocol/mcpb / getLogger

Function getLogger

src/shared/log.ts:5–33  ·  view source on GitHub ↗
({ silent = false }: LoggerOptions = {})

Source from the content-addressed store, hash-verified

3}
4
5export function getLogger({ silent = false }: LoggerOptions = {}) {
6 return {
7 log: (...args: unknown[]) => {
8 if (!silent) {
9 console.log(...args);
10 }
11 },
12 error: (...args: unknown[]) => {
13 if (!silent) {
14 console.error(...args);
15 }
16 },
17 warn: (...args: unknown[]) => {
18 if (!silent) {
19 console.warn(...args);
20 }
21 },
22 info: (...args: unknown[]) => {
23 if (!silent) {
24 console.info(...args);
25 }
26 },
27 debug: (...args: unknown[]) => {
28 if (!silent) {
29 console.debug(...args);
30 }
31 },
32 };
33}

Callers 2

unpackExtensionFunction · 0.85
packExtensionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…