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

Make libxmtp logs public #385

Merged
merged 1 commit into from
Aug 15, 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
10 changes: 5 additions & 5 deletions Sources/XMTPiOS/XMTPLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import LibXMTP
import os

class XMTPLogger: FfiLogger {
let logger = Logger()
let logger = Logger(subsystem: "XMTP", category: "libxmtp")

func log(level: UInt32, levelLabel: String, message: String) {
switch level {
case 1:
logger.error("libxmtp[\(levelLabel)] - \(message)")
logger.error("libxmtp[\(levelLabel, privacy: .public)] - \(message)")
case 2, 3:
logger.info("libxmtp[\(levelLabel)] - \(message)")
logger.info("libxmtp[\(levelLabel, privacy: .public)] - \(message)")
case 4:
logger.debug("libxmtp[\(levelLabel)] - \(message)")
logger.debug("libxmtp[\(levelLabel, privacy: .public)] - \(message)")
case 5:
logger.trace("libxmtp[\(levelLabel)] - \(message)")
logger.trace("libxmtp[\(levelLabel, privacy: .public)] - \(message)")
default:
print("libxmtp[\(levelLabel)] - \(message)")
}
Expand Down
2 changes: 1 addition & 1 deletion XMTP.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |spec|
#

spec.name = "XMTP"
spec.version = "0.14.2"
spec.version = "0.14.3"
spec.summary = "XMTP SDK Cocoapod"

# This description is used to generate tags and improve search results.
Expand Down
Loading