MCPcopy
hub / github.com/davila7/claude-code-templates / log

Function log

cli-tool/components/sandbox/cloudflare/launcher.ts:44–54  ·  view source on GitHub ↗
(message: string, level: 'info' | 'success' | 'error' | 'warning' = 'info')

Source from the content-addressed store, hash-verified

42};
43
44function log(message: string, level: 'info' | 'success' | 'error' | 'warning' = 'info') {
45 const timestamp = new Date().toLocaleTimeString();
46 const prefix = {
47 info: `${colors.blue}ℹ${colors.reset}`,
48 success: `${colors.green}✓${colors.reset}`,
49 error: `${colors.red}✗${colors.reset}`,
50 warning: `${colors.yellow}⚠${colors.reset}`,
51 }[level];
52
53 console.log(`[${timestamp}] ${prefix} ${message}`);
54}
55
56function printSeparator(char: string = '=', length: number = 60) {
57 console.log(char.repeat(length));

Callers 6

saveFilesToDirectoryFunction · 0.85
executeViaWorkerFunction · 0.85
executeDirectlyFunction · 0.85
installAgentsFunction · 0.85
displayResultsFunction · 0.85
mainFunction · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected