Skip to content

Commit cb9e7cd

Browse files
authored
Update README.md
1 parent 71c743b commit cb9e7cd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The logs captured are the same ones visible in Console.app.
66

77
## Usage
88

9+
Capturing logs for one process:
10+
911
```swift
1012
// Specify the process identifier of which to capture logs.
1113
let pid: pid_t = ...
@@ -18,4 +20,12 @@ Task {
1820
}
1921
```
2022

23+
Logs of multiple processes can also be captures with another initializer:
24+
```swift
25+
public static func logs(for processIDs: [pid_t], flags: ActivityStreamOptions) -> AsyncStream<LogMessage>
26+
```
2127

28+
To capture logs of all processes, use the following initializer:
29+
```swift
30+
public static func logs(flags: ActivityStreamOptions) -> AsyncStream<LogMessage>
31+
```

0 commit comments

Comments
 (0)