Skip to content

Commit

Permalink
- Log device, version and locale information at the beginning of ever…
Browse files Browse the repository at this point in the history
…y log file using new SDK protocol

- Show SDK commit hash in Settings
  • Loading branch information
felix-schwarz committed Jul 8, 2019
1 parent ea6c365 commit 09b6e63
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ownCloud/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
4 changes: 2 additions & 2 deletions ownCloud/Settings/MoreSettingsSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions ownCloud/Tools/Log.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

0 comments on commit 09b6e63

Please sign in to comment.