code: public void write(String logName) {
      // [START logging_write_log_entry]
      List<LogEntry> entries = new ArrayList<>();
      entries.add(LogEntry.of(StringPayload.of("Entry payload")));
      Map<String, Object> jsonMap = new HashMap<>();
      jsonMap.put("key", "value");
      entries.add(LogEntry.of(JsonPayload.of(jsonMap)));
      logging.write(
          entries,
          WriteOption.logName(logName),
          WriteOption.resource(MonitoredResource.newBuilder("global").build()));
      // [END logging_write_log_entry]
    }
docs: [VARIABLE "my_log_name"]