Skip to content

Commit

Permalink
reafactor(cli): include bundle id in log predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Jul 15, 2024
1 parent 1e6a5bd commit 0d5e899
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cli/cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0d5e899

Please sign in to comment.