lib/google/cloud/logging/async_writer.rb in google-cloud-logging-1.2.3 vs lib/google/cloud/logging/async_writer.rb in google-cloud-logging-1.3.0

- old
+ new

@@ -94,15 +94,17 @@ # has been thrown. attr_reader :last_exception ## # @private Creates a new AsyncWriter instance. - def initialize logging, max_queue_size = DEFAULT_MAX_QUEUE_SIZE + def initialize logging, max_queue_size = DEFAULT_MAX_QUEUE_SIZE, + partial_success = false super() @logging = logging @max_queue_size = max_queue_size + @partial_success = partial_success @queue_resource = new_cond @queue = [] @queue_size = 0 end @@ -333,10 +335,11 @@ begin logging.write_entries( queue_item.entries, log_name: queue_item.log_name, resource: queue_item.resource, - labels: queue_item.labels + labels: queue_item.labels, + partial_success: @partial_success ) rescue => e # Ignore any exceptions thrown from the background thread, but # keep running to ensure its state behavior remains consistent. @last_exception = e