From 0d5e89910a74c8236a428d91bdfb21a7987757fc Mon Sep 17 00:00:00 2001 From: heapwolf Date: Mon, 15 Jul 2024 15:20:57 +0200 Subject: [PATCH] reafactor(cli): include bundle id in log predicate --- src/cli/cli.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli/cli.cc b/src/cli/cli.cc index 28691bdda..232f264fa 100644 --- a/src/cli/cli.cc +++ b/src/cli/cli.cc @@ -361,7 +361,9 @@ unsigned short createLogSocket() { NSDate* adjustedLogTime = [lastLogTime dateByAddingTimeInterval: -1]; // adjust by subtracting 1 second auto position = [logs positionWithDate: adjustedLogTime]; - auto predicate = [NSPredicate predicateWithFormat: @"(category == 'socket.runtime')"]; + auto bid = settings["meta_bundle_identifier"]; + auto query = String("(category == 'socket.runtime') AND (subsystem == '" + bid + "')"); + auto predicate = [NSPredicate predicateWithFormat: [NSString stringWithUTF8String: query.c_str()]]; auto enumerator = [logs entriesEnumeratorWithOptions: 0 position: position predicate: predicate error: &err]; if (err) {