Class Entry (9.5.7)

Create an entry object to define new data to insert into a meta.

Note, [Cloud Logging Quotas and limits] https://cloud.google.com/logging/quotas dictates that the maximum log entry size, including all [LogEntry Resource properties] https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry , cannot exceed _approximately_ 256 KB.

[LogEntry JSON representation] https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Package

@google-cloud/logging!

Constructors

(constructor)(metadata, data)

  constructor 
 ( 
 metadata 
 ?: 
  
 LogEntry 
 , 
  
 data 
 ?: 
  
 Data 
 ); 
 

Constructs a new instance of the Entry class

Parameters
Name Description
metadata LogEntry
data Data

Properties

data

  data 
 : 
  
 Data 
 ; 
 
Property Value
Type Description
Data
  metadata 
 : 
  
 LogEntry 
 ; 
 
Property Value
Type Description
LogEntry

Methods

fromApiResponse_(entry)

  static 
  
 fromApiResponse_ 
 ( 
 entry 
 : 
  
 google 
 . 
 logging 
 . 
 v2 
 . 
 LogEntry 
 ) 
 : 
  
 Entry 
 ; 
 

Create an Entry object from an API response, such as entries:list .

Parameter
Name Description
entry google.logging.v2.LogEntry

An API representation of an entry. See a [LogEntry]( https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry ).

Returns
Type Description
Entry

{Entry}

toJSON(options, projectId)

  toJSON 
 ( 
 options 
 ?: 
  
 ToJsonOptions 
 , 
  
 projectId 
 ?: 
  
 string 
 ) 
 : 
  
 EntryJson 
 ; 
 

Serialize an entry to the format the API expects. Read more: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry

Parameters
Name Description
options ToJsonOptions

Configuration object.

projectId string

GCP Project ID.

Returns
Type Description
EntryJson

toStructuredJSON(projectId)

  toStructuredJSON 
 ( 
 projectId 
 ?: 
  
 string 
 ) 
 : 
  
 StructuredJson 
 ; 
 

Serialize an entry to a standard format for any transports, e.g. agents. Read more: https://cloud.google.com/logging/docs/structured-logging

Parameter
Name Description
projectId string
Returns
Type Description
StructuredJson
Design a Mobile Site
View Site in Mobile | Classic
Share by: