mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
22 lines
845 B
Swift
22 lines
845 B
Swift
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import SessionServiceKit
|
|
|
|
func FormatAnalyticsLocation(file: String, function: String) -> NSString {
|
|
return "\((file as NSString).lastPathComponent):\(function)" as NSString
|
|
}
|
|
|
|
func OWSProdError(_ eventName: String, file: String, function: String, line: Int32) {
|
|
let location = FormatAnalyticsLocation(file: file, function: function)
|
|
OWSAnalytics
|
|
.logEvent(eventName, severity: .error, parameters: nil, location: location.utf8String!, line:line)
|
|
}
|
|
|
|
func OWSProdInfo(_ eventName: String, file: String, function: String, line: Int32) {
|
|
let location = FormatAnalyticsLocation(file: file, function: function)
|
|
OWSAnalytics
|
|
.logEvent(eventName, severity: .info, parameters: nil, location: location.utf8String!, line:line)
|
|
}
|