Skip to content
Merged
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
27 changes: 27 additions & 0 deletions platform/swift/source/LoggerObjc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

import Foundation

@objc(CAPIssueReporterType)
public enum IssueReporterTypeObjc: Int8 {
case builtIn
case customConfig
}

// Make this class not available to Swift code. It should be used by Objective-c code only.
@available(swift, obsoleted: 1.0)
@objc(CAPLogger)
Expand Down Expand Up @@ -48,6 +54,27 @@ public final class LoggerObjc: NSObject {
}
}

/// Initializes the issue reporting mechanism. Must be called prior to `Logger.start()`
/// This API is experimental and subject to change
@objc
public static func initFatalIssueReporting() {
Capture.Logger.initFatalIssueReporting(.builtIn)
}

/// Initializes the issue reporting mechanism. Must be called prior to `Logger.start()`
/// This API is experimental and subject to change
///
/// - parameter type: mechanism for crash detection
@objc
public static func initFatalIssueReporting(withType type: IssueReporterTypeObjc) {
switch type {
case .builtIn:
Capture.Logger.initFatalIssueReporting(.builtIn)
case .customConfig:
Capture.Logger.initFatalIssueReporting(.customConfig)
}
}

/// Defines the initialization of a new session within the current configured logger.
/// If no logger is configured, this is a no-op.
@objc
Expand Down
Loading