mirror of
https://github.com/ChinaSiro/claude-code-sourcemap.git
synced 2026-05-02 10:16:30 +02:00
30 lines
677 B
JavaScript
30 lines
677 B
JavaScript
export function getLogger({ silent = false } = {}) {
|
|
return {
|
|
log: (...args) => {
|
|
if (!silent) {
|
|
console.log(...args);
|
|
}
|
|
},
|
|
error: (...args) => {
|
|
if (!silent) {
|
|
console.error(...args);
|
|
}
|
|
},
|
|
warn: (...args) => {
|
|
if (!silent) {
|
|
console.warn(...args);
|
|
}
|
|
},
|
|
info: (...args) => {
|
|
if (!silent) {
|
|
console.info(...args);
|
|
}
|
|
},
|
|
debug: (...args) => {
|
|
if (!silent) {
|
|
console.debug(...args);
|
|
}
|
|
},
|
|
};
|
|
}
|