From 09b6e6301929ae15a033fa516cab0267b43f1d3c Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Mon, 8 Jul 2019 23:25:27 +0200 Subject: [PATCH] - Log device, version and locale information at the beginning of every log file using new SDK protocol - Show SDK commit hash in Settings --- ios-sdk | 2 +- ownCloud/Resources/en.lproj/Localizable.strings | 2 +- ownCloud/Settings/MoreSettingsSection.swift | 4 ++-- ownCloud/Tools/Log.swift | 10 ++++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ios-sdk b/ios-sdk index aa72a6126..0ecc238a9 160000 --- a/ios-sdk +++ b/ios-sdk @@ -1 +1 @@ -Subproject commit aa72a612628dd99f8e8c8d0f65de90e5e137d9c1 +Subproject commit 0ecc238a933c63dc81b0aadcb03e3101bf2e7dc1 diff --git a/ownCloud/Resources/en.lproj/Localizable.strings b/ownCloud/Resources/en.lproj/Localizable.strings index 097ece0b8..8e57ea76f 100644 --- a/ownCloud/Resources/en.lproj/Localizable.strings +++ b/ownCloud/Resources/en.lproj/Localizable.strings @@ -166,7 +166,7 @@ "You need to configure an email account first to be able to send emails." = "You need to configure an email account first to be able to send emails."; "Do you want to open the following URL?" = "Do you want to open the following URL?"; -"%@ %@ version %@ build %@ (%@)" = "%@ %@ version %@ build %@ (%@)"; +"%@ %@ version %@ build %@ (app: %@, sdk: %@)" = "%@ %@ version %@ build %@ (app: %@, sdk: %@)"; "beta" = "beta"; "release" = "release"; diff --git a/ownCloud/Settings/MoreSettingsSection.swift b/ownCloud/Settings/MoreSettingsSection.swift index dd986a52b..0145e8ea7 100644 --- a/ownCloud/Settings/MoreSettingsSection.swift +++ b/ownCloud/Settings/MoreSettingsSection.swift @@ -41,8 +41,8 @@ class MoreSettingsSection: SettingsSection { buildType = "beta".localized } - let localizedFooter = "%@ %@ version %@ build %@ (%@)".localized - let footerTitle = String(format: localizedFooter, OCAppIdentity.shared.appName!, buildType, VendorServices.shared.appVersion, VendorServices.shared.appBuildNumber, VendorServices.shared.lastGitCommit) + let localizedFooter = "%@ %@ version %@ build %@ (app: %@, sdk: %@)".localized + let footerTitle = String(format: localizedFooter, OCAppIdentity.shared.appName ?? "App", buildType, VendorServices.shared.appVersion, VendorServices.shared.appBuildNumber, VendorServices.shared.lastGitCommit, OCAppIdentity.shared.sdkCommit ?? "unknown") self.footerTitle = footerTitle diff --git a/ownCloud/Tools/Log.swift b/ownCloud/Tools/Log.swift index cccc9c863..dead6461b 100644 --- a/ownCloud/Tools/Log.swift +++ b/ownCloud/Tools/Log.swift @@ -77,3 +77,13 @@ class Log { return OCLogger.applyPrivacyMask(obj) ?? "(null)" } } + +extension OCLogger : OCLogIntroFormat { + public func logIntroFormat() -> String { + return "{{stdIntro}}; Log options: \(Log.logOptionStatus)" + } + + public func logHostCommit() -> String? { + return LastGitCommit() + } +}