Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Wouter01 authored May 22, 2023
1 parent 71c743b commit cb9e7cd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The logs captured are the same ones visible in Console.app.

## Usage

Capturing logs for one process:

```swift
// Specify the process identifier of which to capture logs.
let pid: pid_t = ...
Expand All @@ -18,4 +20,12 @@ Task {
}
```

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

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

0 comments on commit cb9e7cd

Please sign in to comment.