Skip to content

Commit

Permalink
fix: enable v2.LogEntry Protobufs converter functions (#1509)
Browse files Browse the repository at this point in the history
* fix: enable v2.LogEntry Protobufs converter

* fix formatting

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: cindy-peng <cindypeng@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Jan 24, 2024
1 parent b40e846 commit 9ef4d90
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -760,7 +760,7 @@ public static LogEntry of(String logName, MonitoredResource resource, Payload<?>
return newBuilder(payload).setLogName(logName).setResource(resource).build();
}

static LogEntry fromPb(com.google.logging.v2.LogEntry entryPb) {
public static LogEntry fromPb(com.google.logging.v2.LogEntry entryPb) {
Builder builder = newBuilder(Payload.fromPb(entryPb));
builder.setLabels(entryPb.getLabelsMap());
builder.setSeverity(Severity.fromPb(entryPb.getSeverity()));
Expand Down Expand Up @@ -805,7 +805,8 @@ static LogEntry fromPb(com.google.logging.v2.LogEntry entryPb) {
return builder.build();
}

static Function<LogEntry, com.google.logging.v2.LogEntry> toPbFunction(final String projectId) {
public static Function<LogEntry, com.google.logging.v2.LogEntry> toPbFunction(
final String projectId) {
return (LogEntry entry) -> {
return entry.toPb(projectId);
};
Expand Down

0 comments on commit 9ef4d90

Please sign in to comment.