lib/google/cloud/logging/logger.rb in google-cloud-logging-1.2.3 vs lib/google/cloud/logging/logger.rb in google-cloud-logging-1.3.0

- old
+ new

@@ -34,9 +34,23 @@ # version_id: "20150925t173233" # # logger = logging.logger "my_app_log", resource, env: :production # logger.info "Job started." # + # @example Provide a hash to write a JSON payload to the log: + # require "google/cloud/logging" + # + # logging = Google::Cloud::Logging.new + # + # resource = logging.resource "gae_app", + # module_id: "1", + # version_id: "20150925t173233" + # + # logger = logging.logger "my_app_log", resource, env: :production + # + # payload = { "stats" => { "a" => 8, "b" => 12.5} } + # logger.info payload + # class Logger ## # A RequestInfo represents data about the request being handled by the # current thread. It is used to configure logs coming from that thread. #