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

[feature/log-info] Log device, version and locale info #446

Merged
merged 1 commit into from
Jul 10, 2019
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
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()
}
}