-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Vertex AI] Update logging details from Google AI SDK #12933
Conversation
@@ -18,13 +18,19 @@ import OSLog | |||
@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) | |||
struct Logging { | |||
/// Subsystem that should be used for all Loggers. | |||
static let subsystem = "com.google.generative-ai" | |||
static let subsystem = "com.google.firebase.vertex-ai" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that subsystem is redundant with [FirebaseVertexAI]
? I'm fine to leave that as a future question.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing it up, @paulb777. It is largely redundant given that a Firebase dev would need to filter by tag (like [FirebaseVertexAI]
) since the rest of our SDKs print like this. However, if we were to migrate everything to OSLog in the future it would actually be [FirebaseVertexAI]
that would be redundant (along with -FIRDebugEnabled
). Rather than setting a log level as a launch argument in Xcode, with OSLog it's easy to filter by levels and subsystems in the Xcode UI, e.g.:
In the above, I've enabled the option to display the subsystem and to filter by it, as well as log level. Definitely more flexible to tweak these as needed without having to restart the app. These options are also available in the Console app.
For now I'll leave it in (alternative is an empty string, like we did for category
, since the parameter is non-optional) but we can adjust later or migrate to FirebaseLogger
.
[GoogleGenerativeAI]
to[FirebaseVertexAI]
.-FIRDebugEnabled
as the launch argument to enable additional logging.-GoogleGenerativeAIDebugLogEnabled
is still accepted with a warning message."To enable additional logging, add -GoogleGenerativeAIDebugLogEnabled as a launch argument in Xcode."
when additional logging is already enabled.#no-changelog