# Cloud Logging API - Class Google::Cloud::Logging::AsyncWriterError (v2.7.0)

2.7.0 (latest) 2.6.1 2.5.0 2.4.0 2.3.3 2.2.2 Reference documentation and code samples for the Cloud Logging API class Google::Cloud::Logging::AsyncWriterError.

## AsyncWriterError

Used to indicate a problem preventing [AsyncWriter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging/latest/Google-Cloud-Logging-AsyncWriter "Google::Cloud::Logging::AsyncWriter (class)") from asynchronously
calling the API. This can occur when the [AsyncWriter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging/latest/Google-Cloud-Logging-AsyncWriter "Google::Cloud::Logging::AsyncWriter (class)") has too few
resources allocated for the amount of usage.

## Inherits

- Google::Cloud::Error

## Example

```ruby
require "google/cloud/logging"
require "google/cloud/error_reporting"

logging = Google::Cloud::Logging.new

resource = logging.resource "gae_app",
                            module_id: "1",
                            version_id: "20150925t173233"

async = logging.async_writer

# Register to be notified when unhandled errors occur.
async.on_error do |error|
  # error can be a AsyncWriterError, with entries
  Google::Cloud::ErrorReporting.report error
end

logger = async.logger "my_app_log", resource, env: :production
logger.info "Job started."
```

## Methods

### #count

    def count() -> Array<Google::Cloud::Logging::Entry>

objects that were not written to the API due to the error.
**Returns**

- (Array\<[Google::Cloud::Logging::Entry](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging/latest/Google-Cloud-Logging-Entry)\>) --- entries The entry

### #entries

    def entries()

Returns the value of attribute entries.

### #initialize

    def initialize(message, entries = nil) -> AsyncWriterError

**Returns**

- ([AsyncWriterError](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-logging/latest/Google-Cloud-Logging-AsyncWriterError)) --- a new instance of AsyncWriterError