MCPcopy Index your code
hub / github.com/callstack/agent-device / buildAppleLogPredicate

Function buildAppleLogPredicate

src/daemon/app-log-ios.ts:36–59  ·  view source on GitHub ↗
(
  appBundleId: string,
  executableName?: string | undefined,
)

Source from the content-addressed store, hash-verified

34let cachedSupportedIosDeviceConsoleCapture: IosDeviceConsoleCaptureSupport | undefined;
35
36export function buildAppleLogPredicate(
37 appBundleId: string,
38 executableName?: string | undefined,
39): string {
40 const escapedBundleId = escapeAppleLogPredicateString(appBundleId);
41 const clauses = [
42 `subsystem == "${escapedBundleId}"`,
43 // App frameworks/extensions often log through subsystem names prefixed by the app bundle id.
44 `subsystem CONTAINS "${escapedBundleId}"`,
45 `processImagePath ENDSWITH[c] "/${escapedBundleId}"`,
46 `senderImagePath ENDSWITH[c] "/${escapedBundleId}"`,
47 ];
48 if (executableName) {
49 const escapedExecutable = escapeAppleLogPredicateString(executableName);
50 clauses.push(
51 `process == "${escapedExecutable}"`,
52 `processImagePath ENDSWITH[c] "/${escapedExecutable}"`,
53 `senderImagePath ENDSWITH[c] "/${escapedExecutable}"`,
54 `processImagePath CONTAINS[c] "/${escapedExecutable}.app/"`,
55 `senderImagePath CONTAINS[c] "/${escapedExecutable}.app/"`,
56 );
57 }
58 return clauses.join(' OR ');
59}
60
61export function buildIosSimulatorLogStreamArgs(params: {
62 deviceId: string;

Callers 4

app-log.test.tsFile · 0.90
startMacOsAppLogFunction · 0.85

Calls 2

pushMethod · 0.80

Tested by

no test coverage detected