Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating new documentation for OSLogWriter #419

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ import platform.darwin.os_log_type_t
import kotlin.experimental.ExperimentalNativeApi

/**
* Write log statements to darwin oslog.
* Write log statements to darwin OSLog.
*
* Takes in three optional parameters specific to OSLog calls:
* subsystem - An identifier string that's passed directly into the OSLog constructor. (See documentation https://developer.apple.com/documentation/os/oslog/2320726-init)
* category - A category within the subsystem that's passed directly into the OSLog constructor. (See documentation https://developer.apple.com/documentation/os/oslog/2320726-init)
* publicLogging - When true OSLog enforces logs to be public (See documentation https://developer.apple.com/documentation/os/logging/generating_log_messages_from_your_code#3665948)
*/
open class OSLogWriter internal constructor(
private val messageStringFormatter: MessageStringFormatter,
Expand Down
7 changes: 6 additions & 1 deletion website/docs/IOS_LOGGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ This is the default `LogWriter`. It is designed for local development. Each seve

## OSLogWriter

This is the parent class of `XcodeSeverityWriter`. There is no emoji added for severity, and `Throwable` is sent as a string to oslog. This may trim exceptions. You can implement a custom version that writes each line of a stack trace to oslog, or whatever else you'd like to do. Override `logThrowable`.
This is the parent class of `XcodeSeverityWriter`. There is no emoji added for severity, and `Throwable` is sent as a string to OSLog. This may trim exceptions. You can implement a custom version that writes each line of a stack trace to OSLog, or whatever else you'd like to do. Override `logThrowable`.

In addition to the `MessageStringFormatter`, `OSLogWriter` takes in three optional parameters specific to OSLog calls:
* `subsystem` - An identifier string that's passed directly into the OSLog constructor. (See more [here](https://developer.apple.com/documentation/os/oslog/2320726-init)).
* `category` - A category within the subsystem that's passed directly into the OSLog constructor. (See more [here](https://developer.apple.com/documentation/os/oslog/2320726-init)).
* `publicLogging` - When true `OSLog` enforces logs to be public (See documentation [here](https://developer.apple.com/documentation/os/logging/generating_log_messages_from_your_code#3665948)).

## NSLogWriter

Expand Down
Loading