Class: Google::Cloud::Logging::Logger::RequestInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/google/cloud/logging/logger.rb

Overview

A RequestInfo represents data about the request being handled by the current thread. It is used to configure logs coming from that thread.

The trace_id is a String that controls the trace ID sent with the log entry. If it is nil, no trace ID is sent.

The log_name is a String that controls the name of the Stackdriver log to write to. If it is nil, the default log_name for this Logger is used.

Instance Attribute Summary collapse

Instance Attribute Details

#envObject

Returns the value of attribute env

Returns:

  • (Object)

    the current value of env



65
66
67
# File 'lib/google/cloud/logging/logger.rb', line 65

def env
  @env
end

#log_nameObject

Returns the value of attribute log_name

Returns:

  • (Object)

    the current value of log_name



65
66
67
# File 'lib/google/cloud/logging/logger.rb', line 65

def log_name
  @log_name
end

#trace_idObject

Returns the value of attribute trace_id

Returns:

  • (Object)

    the current value of trace_id



65
66
67
# File 'lib/google/cloud/logging/logger.rb', line 65

def trace_id
  @trace_id
end

#trace_sampledObject

Returns the value of attribute trace_sampled

Returns:

  • (Object)

    the current value of trace_sampled



65
66
67
# File 'lib/google/cloud/logging/logger.rb', line 65

def trace_sampled
  @trace_sampled
end