MCPcopy Index your code
hub / github.com/devcontainers/cli / createLog

Function createLog

src/spec-node/devContainers.ts:271–278  ·  view source on GitHub ↗
(options: LogOptions, pkg: PackageConfiguration, sessionStart: Date, disposables: (() => Promise<unknown> | undefined)[], omitHeader?: boolean, secrets?: Record<string, string>)

Source from the content-addressed store, hash-verified

269}
270
271export function createLog(options: LogOptions, pkg: PackageConfiguration, sessionStart: Date, disposables: (() => Promise<unknown> | undefined)[], omitHeader?: boolean, secrets?: Record<string, string>) {
272 const header = omitHeader ? undefined : `${pkg.name} ${pkg.version}. Node.js ${process.version}. ${os.platform()} ${os.release()} ${os.arch()}.`;
273 const output = createLogFrom(options, sessionStart, header, secrets);
274 output.dimensions = options.terminalDimensions;
275 output.onDidChangeDimensions = options.onDidChangeTerminalDimensions;
276 disposables.push(() => output.join());
277 return output;
278}
279
280function createLogFrom({ log: write, logLevel, logFormat }: LogOptions, sessionStart: Date, header: string | undefined = undefined, secrets?: Record<string, string>): Log & { join(): Promise<void> } {
281 const handler = logFormat === 'json' ? createJSONLog(write, () => logLevel, sessionStart) :

Callers 13

featuresUpgradeFunction · 0.90
readConfigurationFunction · 0.90
outdatedFunction · 0.90
featuresInfoFunction · 0.90
featuresGenerateDocsFunction · 0.90
featuresPublishFunction · 0.90
featuresPackageFunction · 0.90
templateMetadataFunction · 0.90
templatesGenerateDocsFunction · 0.90
templatesPublishFunction · 0.90
templateApplyFunction · 0.90

Calls 1

createLogFromFunction · 0.85

Tested by

no test coverage detected