Package com.google.cloud.logging
Class SinkInfo
java.lang.Object
com.google.cloud.logging.SinkInfo
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Sink
Cloud Logging sinks can be used to control the export of your logs. Each sink specifies the
export of a set of log entries to a certain destination. A sink consists of a name, unique to the
project, a filter for choosing the log entries to export and a destination for the log entries.
Sink destination can either be a Google Cloud Storage bucket (see SinkInfo.Destination.BucketDestination, a Google Cloud BigQuery dataset (see SinkInfo.Destination.DatasetDestination) or a Google Cloud Pub/Sub topic (see SinkInfo.Destination.TopicDestination).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder forSinkInfoobjects.static classstatic enumAvailable log entry formats. -
Method Summary
Modifier and TypeMethodDescriptionboolean<T extends SinkInfo.Destination>
TReturns the export destination.Returns an advanced logs filter.getName()Returns the name of the sink.Returns the log entry version to use for this sink's exported log entries.inthashCode()static SinkInfo.BuildernewBuilder(String name, SinkInfo.Destination destination) Returns a builder forSinkInfoobjects given the name of the sink and its destination.static SinkInfoof(String name, SinkInfo.Destination destination) Creates aSinkInfoobject given the name of the sink and its destination.Returns a builder for thisSinkInfoobject.toString()
-
Method Details
-
getName
Returns the name of the sink. Example:my-severe-errors-to-pubsub. Sink identifiers are limited to 1000 characters and can include only the following characters:A-Z,a-z,0-9, and the special characters_-.. -
getDestination
Returns the export destination. This method returns aSinkInfo.Destination.BucketDestinationfor sinks that export logs to Google Cloud Storage buckets. ReturnsSinkInfo.Destination.DatasetDestinationfor sinks that export logs to Google Cloud BigQuery datasets. ReturnsSinkInfo.Destination.TopicDestinationfor sinks that export logs to Google Cloud Pub/Sub topics.- See Also:
-
getFilter
Returns an advanced logs filter. Only log entries matching that filter are exported. The filter must be consistent with the log entry format specified ingetVersionFormat(), regardless of the format of the log entry that wa originally written to Cloud Logging. Example (V2 format):logName=projects/my-projectid/logs/syslog AND severity>=ERROR.- See Also:
-
getVersionFormat
Returns the log entry version to use for this sink's exported log entries. This version does not have to correspond to the version of the log entry when it was written to Google Cloud Logging. -
toString
-
equals
-
hashCode
public int hashCode() -
toBuilder
Returns a builder for thisSinkInfoobject. -
newBuilder
Returns a builder forSinkInfoobjects given the name of the sink and its destination. -
of
Creates aSinkInfoobject given the name of the sink and its destination.
-