MCPcopy
hub / github.com/callstack/agent-device / getAppLogRedactionPatterns

Function getAppLogRedactionPatterns

src/daemon/app-log.ts:136–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134}
135
136function getAppLogRedactionPatterns(): RegExp[] {
137 const raw = process.env.AGENT_DEVICE_APP_LOG_REDACT_PATTERNS;
138 if (!raw) return [];
139 const patterns = raw
140 .split(',')
141 .map((part) => part.trim())
142 .filter((part) => part.length > 0);
143 const result: RegExp[] = [];
144 for (const pattern of patterns) {
145 try {
146 result.push(new RegExp(pattern, 'gi'));
147 } catch {
148 // Skip invalid user pattern.
149 }
150 }
151 return result;
152}
153
154export function rotateAppLogIfNeeded(
155 outPath: string,

Callers 1

startLocalAppLogFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected