MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / getLogHeader

Function getLogHeader

src/extension/utils/log.ts:47–56  ·  view source on GitHub ↗
(suppressHeaderFooter?: boolean)

Source from the content-addressed store, hash-verified

45 logHeader.length = 0;
46}
47export function getLogHeader(suppressHeaderFooter?: boolean) {
48 if (!logHeader.length)
49 return "";
50
51 return [
52 ...(suppressHeaderFooter ? [] : ["!! ⚠️ PLEASE REVIEW THIS LOG FOR SENSITIVE INFORMATION BEFORE SHARING ⚠️ !!"]),
53 ...logHeader,
54 ...(suppressHeaderFooter ? [] : [platformEol]),
55 ].join(platformEol);
56}
57export function addToLogHeader(f: () => string) {
58 try {
59 logHeader.push(f().replace(/\r/g, "").replace(/\n/g, "\r\n"));

Callers 6

setupLogFunction · 0.90
buildLogHeadersFunction · 0.90
onWillStartSessionMethod · 0.90
startLoggingMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected