Nathaniel Manista | 4f877e5 | 2015-06-15 16:44:50 +0000 | [diff] [blame^] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="logging_v1beta3.html">Google Cloud Logging API</a> . <a href="logging_v1beta3.projects.html">projects</a> . <a href="logging_v1beta3.projects.logs.html">logs</a> . <a href="logging_v1beta3.projects.logs.entries.html">entries</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#write">write(projectsId, logsId, body, x__xgafv=None)</a></code></p> |
| 79 | <p class="firstline">Creates one or more log entries in a log. You must supply a list of `LogEntry` objects, named `entries`. Each `LogEntry` object must contain a payload object and a `LogEntryMetadata` object that describes the entry. You must fill in all the fields of the entry, metadata, and payload. You can also supply a map, `commonLabels`, that supplies default (key, value) data for the `entries[].metadata.labels` maps, saving you the trouble of creating identical copies for each entry.</p> |
| 80 | <h3>Method Details</h3> |
| 81 | <div class="method"> |
| 82 | <code class="details" id="write">write(projectsId, logsId, body, x__xgafv=None)</code> |
| 83 | <pre>Creates one or more log entries in a log. You must supply a list of `LogEntry` objects, named `entries`. Each `LogEntry` object must contain a payload object and a `LogEntryMetadata` object that describes the entry. You must fill in all the fields of the entry, metadata, and payload. You can also supply a map, `commonLabels`, that supplies default (key, value) data for the `entries[].metadata.labels` maps, saving you the trouble of creating identical copies for each entry. |
| 84 | |
| 85 | Args: |
| 86 | projectsId: string, Part of `logName`. The name of the log resource into which to insert the log entries. (required) |
| 87 | logsId: string, Part of `logName`. See documentation of `projectsId`. (required) |
| 88 | body: object, The request body. (required) |
| 89 | The object takes the form of: |
| 90 | |
| 91 | { # The parameters to WriteLogEntries. |
| 92 | "commonLabels": { # Metadata labels that apply to all entries in this request. If one of the log entries contains a (key, value) with the same key that is in `commonLabels`, then the entry's (key, value) overrides the one in `commonLabels`. |
| 93 | "a_key": "A String", |
| 94 | }, |
| 95 | "entries": [ # Log entries to insert. |
| 96 | { # An individual entry in a log. |
| 97 | "log": "A String", # The log to which this entry belongs. When a log entry is ingested, the value of this field is set by the logging system. |
| 98 | "textPayload": "A String", # The log entry payload, represented as a text string. |
| 99 | "structPayload": { # The log entry payload, represented as a structure that is expressed as a JSON object. |
| 100 | "a_key": "", # Properties of the object. |
| 101 | }, |
| 102 | "insertId": "A String", # A unique ID for the log entry. If you provide this field, the logging service considers other log entries in the same log with the same ID as duplicates which can be removed. |
| 103 | "protoPayload": { # The log entry payload, represented as a protocol buffer that is expressed as a JSON object. You can only pass `protoPayload` values that belong to a set of approved types. |
| 104 | "a_key": "", # Properties of the object. Contains field @ype with type URL. |
| 105 | }, |
| 106 | "metadata": { # Additional data that is associated with a log entry, set by the service creating the log entry. # Information about the log entry. |
| 107 | "severity": "A String", # The severity of the log entry. |
| 108 | "zone": "A String", # The zone of the Google Cloud Platform service that created the log entry. For example, `"us-central1-a"`. |
| 109 | "timestamp": "A String", # The time the event described by the log entry occurred. Timestamps must be later than January 1, 1970. |
| 110 | "region": "A String", # The region name of the Google Cloud Platform service that created the log entry. For example, `"us-central1"`. |
| 111 | "labels": { # A set of (key, value) data that provides additional information about the log entry. If the log entry is from one of the Google Cloud Platform sources listed below, the indicated (key, value) information must be provided: Google App Engine, service_name `appengine.googleapis.com`: "appengine.googleapis.com/module_id", "appengine.googleapis.com/version_id", and one of: "appengine.googleapis.com/replica_index", "appengine.googleapis.com/clone_id", or else provide the following Compute Engine labels: Google Compute Engine, service_name `compute.googleapis.com`: "compute.googleapis.com/resource_type", "instance" "compute.googleapis.com/resource_id", |
| 112 | "a_key": "A String", |
| 113 | }, |
| 114 | "userId": "A String", # The fully-qualified email address of the authenticated user that performed or requested the action represented by the log entry. If the log entry does not apply to an action taken by an authenticated user, then the field should be empty. |
| 115 | "serviceName": "A String", # The API name of the Google Cloud Platform service that created the log entry. For example, `"compute.googleapis.com"`. |
| 116 | "projectId": "A String", # The project ID of the Google Cloud Platform service that created the log entry. |
| 117 | }, |
| 118 | }, |
| 119 | ], |
| 120 | } |
| 121 | |
| 122 | x__xgafv: string, V1 error format. |
| 123 | |
| 124 | Returns: |
| 125 | An object of the form: |
| 126 | |
| 127 | { # Result returned from WriteLogEntries. empty |
| 128 | }</pre> |
| 129 | </div> |
| 130 | |
| 131 | </body></html> |