Skip to content

Commit

Permalink
Creates log viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuravi committed Nov 10, 2024
1 parent fed2d72 commit af4fac2
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 2 deletions.
28 changes: 28 additions & 0 deletions TemplateApplication.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
5680DD3E2AB8CD84004E6D4A /* ContributionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5680DD3D2AB8CD84004E6D4A /* ContributionsTest.swift */; };
56E708352BB06B7100B08F0A /* SpeziLicense in Frameworks */ = {isa = PBXBuildFile; productRef = 56E708342BB06B7100B08F0A /* SpeziLicense */; };
56E7083B2BB06F6F00B08F0A /* SwiftPackageList in Frameworks */ = {isa = PBXBuildFile; productRef = 56E7083A2BB06F6F00B08F0A /* SwiftPackageList */; };
63E851782CE0FFCB005554E7 /* OSLogEntryLog+FormattedLogOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E851772CE0FFC5005554E7 /* OSLogEntryLog+FormattedLogOutput.swift */; };
63E8517A2CE0FFDE005554E7 /* LogLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E851792CE0FFDC005554E7 /* LogLevel.swift */; };
63E8517C2CE0FFF9005554E7 /* LogManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E8517B2CE0FFF6005554E7 /* LogManager.swift */; };
63E8517E2CE10007005554E7 /* LogViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E8517D2CE10005005554E7 /* LogViewer.swift */; };
63E851802CE10016005554E7 /* LogsListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63E8517F2CE10014005554E7 /* LogsListView.swift */; };
653A2551283387FE005D4D48 /* TemplateApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A2550283387FE005D4D48 /* TemplateApplication.swift */; };
653A255528338800005D4D48 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 653A255428338800005D4D48 /* Assets.xcassets */; };
653A256228338800005D4D48 /* TemplateApplicationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653A256128338800005D4D48 /* TemplateApplicationTests.swift */; };
Expand Down Expand Up @@ -118,6 +123,11 @@
2FE5DCAC29EE6107004B9AB4 /* AccountOnboarding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountOnboarding.swift; sourceTree = "<group>"; };
2FF53D8C2A8729D600042B76 /* TemplateApplicationStandard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TemplateApplicationStandard.swift; sourceTree = "<group>"; };
5680DD3D2AB8CD84004E6D4A /* ContributionsTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContributionsTest.swift; sourceTree = "<group>"; };
63E851772CE0FFC5005554E7 /* OSLogEntryLog+FormattedLogOutput.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OSLogEntryLog+FormattedLogOutput.swift"; sourceTree = "<group>"; };
63E851792CE0FFDC005554E7 /* LogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogLevel.swift; sourceTree = "<group>"; };
63E8517B2CE0FFF6005554E7 /* LogManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogManager.swift; sourceTree = "<group>"; };
63E8517D2CE10005005554E7 /* LogViewer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewer.swift; sourceTree = "<group>"; };
63E8517F2CE10014005554E7 /* LogsListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogsListView.swift; sourceTree = "<group>"; };
653A254D283387FE005D4D48 /* TemplateApplication.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TemplateApplication.app; sourceTree = BUILT_PRODUCTS_DIR; };
653A2550283387FE005D4D48 /* TemplateApplication.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateApplication.swift; sourceTree = "<group>"; };
653A255428338800005D4D48 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -251,6 +261,18 @@
path = SharedContext;
sourceTree = "<group>";
};
63E851762CE0FF85005554E7 /* Logs */ = {
isa = PBXGroup;
children = (
63E8517F2CE10014005554E7 /* LogsListView.swift */,
63E8517D2CE10005005554E7 /* LogViewer.swift */,
63E8517B2CE0FFF6005554E7 /* LogManager.swift */,
63E851792CE0FFDC005554E7 /* LogLevel.swift */,
63E851772CE0FFC5005554E7 /* OSLogEntryLog+FormattedLogOutput.swift */,
);
path = Logs;
sourceTree = "<group>";
};
653A2544283387FE005D4D48 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -287,6 +309,7 @@
2FE5DC2829EDD398004B9AB4 /* Onboarding */,
2FE5DC2D29EDD792004B9AB4 /* Resources */,
2FE5DC3B29EDD7D0004B9AB4 /* Schedule */,
63E851762CE0FF85005554E7 /* Logs */,
2FE5DC3C29EDD7DA004B9AB4 /* SharedContext */,
2FC9759D2978E30800BA99FE /* Supporting Files */,
);
Expand Down Expand Up @@ -528,15 +551,19 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
63E8517C2CE0FFF9005554E7 /* LogManager.swift in Sources */,
2FE5DC4129EDD7EE004B9AB4 /* StorageKeys.swift in Sources */,
2FE5DCB129EE6107004B9AB4 /* AccountOnboarding.swift in Sources */,
2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */,
2FE5DC3829EDD7CA004B9AB4 /* InterestingModules.swift in Sources */,
2FE5DC3529EDD7CA004B9AB4 /* Consent.swift in Sources */,
2FC975A82978F11A00BA99FE /* HomeView.swift in Sources */,
63E851782CE0FFCB005554E7 /* OSLogEntryLog+FormattedLogOutput.swift in Sources */,
2FE5DC4E29EDD7FA004B9AB4 /* ScheduleView.swift in Sources */,
63E851802CE10016005554E7 /* LogsListView.swift in Sources */,
A9DFE8A92ABE551400428242 /* AccountButton.swift in Sources */,
A9A3DCC82C75CBBD00FC9B69 /* FirebaseConfiguration.swift in Sources */,
63E8517A2CE0FFDE005554E7 /* LogLevel.swift in Sources */,
2FE5DC3729EDD7CA004B9AB4 /* OnboardingFlow.swift in Sources */,
2F1AC9DF2B4E840E00C24973 /* TemplateApplication.docc in Sources */,
2FF53D8D2A8729D600042B76 /* TemplateApplicationStandard.swift in Sources */,
Expand All @@ -551,6 +578,7 @@
653A2551283387FE005D4D48 /* TemplateApplication.swift in Sources */,
2FE5DC3629EDD7CA004B9AB4 /* HealthKitPermissions.swift in Sources */,
2F65B44E2A3B8B0600A36932 /* NotificationPermissions.swift in Sources */,
63E8517E2CE10007005554E7 /* LogViewer.swift in Sources */,
2FE5DC2629EDD38A004B9AB4 /* Contacts.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<CommandLineArguments>
<CommandLineArgument
argument = "--disableFirebase"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--showOnboarding"
Expand All @@ -95,7 +95,7 @@
</CommandLineArgument>
<CommandLineArgument
argument = "--useFirebaseEmulator"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<EnvironmentVariables>
Expand Down
6 changes: 6 additions & 0 deletions TemplateApplication/Account/AccountSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ struct AccountSheet: View {
} label: {
Text("License Information")
}

NavigationLink {
LogViewer()
} label: {
Text("View Logs")
}
}
} else {
AccountSetup { _ in
Expand Down
90 changes: 90 additions & 0 deletions TemplateApplication/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,66 @@
}
}
},
"LOGS_FROM_DATE_LABEL" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Date From"
}
}
}
},
"LOGS_LEVEL_LABEL" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Log Level"
}
}
}
},
"LOGS_LOADING_LABEL" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Loading Logs…"
}
}
}
},
"LOGS_SHARE_PREVIEW_TITLE" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Logs"
}
}
}
},
"LOGS_TO_DATE_LABEL" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Date To"
}
}
}
},
"LOGS_VIEWER_TITLE" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Log Viewer"
}
}
}
},
"Next" : {
"localizations" : {
"en" : {
Expand All @@ -241,6 +301,16 @@
}
}
},
"NO_LOGS_AVAILABLE" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "No Logs Available"
}
}
}
},
"NOTIFICATION_PERMISSIONS_DESCRIPTION" : {
"localizations" : {
"en" : {
Expand All @@ -261,6 +331,16 @@
}
}
},
"OK" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ok"
}
}
}
},
"Onboarding" : {
"localizations" : {
"en" : {
Expand Down Expand Up @@ -366,6 +446,16 @@
},
"Unsupported Event" : {

},
"View Logs" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "View Logs"
}
}
}
},
"WELCOME_AREA1_DESCRIPTION" : {
"localizations" : {
Expand Down
2 changes: 2 additions & 0 deletions TemplateApplication/TemplateApplicationDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class TemplateApplicationDelegate: SpeziAppDelegate {
OnboardingDataSource()

Notifications()

LogManager()
}
}

Expand Down

0 comments on commit af4fac2

Please sign in to comment.