-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.lang: javaIssues specific to Java.Issues specific to Java.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
Currently, the set of WriteOption options is limited to
java-logging/google-cloud-logging/src/main/java/com/google/cloud/logging/Logging.java
Lines 69 to 72 in 9d0e7a2
| enum OptionType implements Option.OptionType { | |
| LOG_NAME, | |
| RESOURCE, | |
| LABELS; |
and does not allow to customize log name. The location of the log is produced based on the project id which is taken from the logging client options:
java-logging/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java
Lines 741 to 746 in 9d0e7a2
| String projectId = serviceOptions.getProjectId(); | |
| WriteLogEntriesRequest.Builder builder = WriteLogEntriesRequest.newBuilder(); | |
| String logName = LOG_NAME.get(options); | |
| if (logName != null) { | |
| builder.setLogName(LogName.ofProjectLogName(projectId, logName).toString()); | |
| } |
This project id is retrieved from authentication workflow and is not necessary the same with the needed log destination. There also cases when the destination should be other than a project
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.lang: javaIssues specific to Java.Issues specific to Java.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.