Repository navigation
Logging - no public API to create SourceLocation.Builder #3331
Copy link
Copy link
Closed
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Activity
Sounds reasonable.
(While before the method is added, you should be able to usenew SourceLocation.Builder()to create a builder. It is not optimized but should work, as is used in tests)- addedtype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.
on Jun 1, 2018 The problem is that the SourceLocation.Builder constructor is also private, as seen here:
The reason this works in the tests is that they share the same package/namespace, but it doesn't work for others.
Oh sorry I missed that. Working on that soon.
Reacted by Leon Mergen- added a commit that references this issue
on Mar 9, 2026
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
It appears there is no public API to create a new
com.google.cloud.logging.SourceLocation.Builderobject, thus I am unable to append this metadata to the log entries.Expected API would be to have a public
com.google.cloud.logging.SourceLocation.newBuilder()function, but this is not there.