MCPcopy Create free account
hub / github.com/cortexkit/magic-context / getMagicContextLogPath

Function getMagicContextLogPath

packages/plugin/src/shared/data-path.ts:48–55  ·  view source on GitHub ↗
(harness: HarnessId = getHarness())

Source from the content-addressed store, hash-verified

46 * reflected in the next flush.
47 */
48export function getMagicContextLogPath(harness: HarnessId = getHarness()): string {
49 // An explicit override wins over the harness temp-dir default, so users on
50 // sandboxed/ephemeral setups (Docker, CI) can point the diagnostic log at a
51 // persistent or shared path. Blank/whitespace is treated as unset.
52 const envPath = process.env.MAGIC_CONTEXT_LOG_PATH?.trim();
53 if (envPath) return envPath;
54 return path.join(getMagicContextTempDir(harness), "magic-context.log");
55}
56
57/**
58 * Directory used for both historian validation-failure dumps and the

Callers 3

data-path.test.tsFile · 0.90
flushFunction · 0.90
getLogFilePathFunction · 0.90

Calls 2

getHarnessFunction · 0.90
getMagicContextTempDirFunction · 0.85

Tested by

no test coverage detected