google-logging-utils-0.2.0/0000755000004100000410000000000015143455142015603 5ustar www-datawww-datagoogle-logging-utils-0.2.0/google-logging-utils.gemspec0000644000004100000410000000242615143455142023212 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: google-logging-utils 0.2.0 ruby lib Gem::Specification.new do |s| s.name = "google-logging-utils".freeze s.version = "0.2.0".freeze s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Google API Authors".freeze] s.date = "1980-01-02" s.email = ["googleapis-packages@google.com".freeze] s.files = ["CHANGELOG.md".freeze, "CODE_OF_CONDUCT.md".freeze, "CONTRIBUTING.md".freeze, "LICENSE".freeze, "README.md".freeze, "lib/google-logging-utils.rb".freeze, "lib/google/logging/message.rb".freeze, "lib/google/logging/source_location.rb".freeze, "lib/google/logging/structured_formatter.rb".freeze, "lib/google/logging/utils.rb".freeze, "lib/google/logging/utils/version.rb".freeze] s.homepage = "https://github.com/googleapis/ruby-core-libraries".freeze s.licenses = ["Apache-2.0".freeze] s.required_ruby_version = Gem::Requirement.new(">= 3.1".freeze) s.rubygems_version = "3.6.8".freeze s.summary = "Utility classes for logging to Google Cloud Logging".freeze end google-logging-utils-0.2.0/CONTRIBUTING.md0000644000004100000410000000211515143455142020033 0ustar www-datawww-data# How to Contribute We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow. ## Contributor License Agreement Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project. Head over to to see your current agreements on file or to sign a new one. You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again. ## Code reviews All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. ## Community Guidelines This project follows [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). google-logging-utils-0.2.0/lib/0000755000004100000410000000000015143455142016351 5ustar www-datawww-datagoogle-logging-utils-0.2.0/lib/google/0000755000004100000410000000000015143455142017625 5ustar www-datawww-datagoogle-logging-utils-0.2.0/lib/google/logging/0000755000004100000410000000000015143455142021253 5ustar www-datawww-datagoogle-logging-utils-0.2.0/lib/google/logging/structured_formatter.rb0000644000004100000410000000413215143455142026067 0ustar www-datawww-data# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require "json" require "google/logging/message" module Google module Logging ## # A log formatter that outputs the JSON-based structured logging format # (https://cloud.google.com/logging/docs/structured-logging) understood by # Google's logging agent. # class StructuredFormatter # @private CLOUD_SEVERITY = Hash.new { |_h, k| k }.merge( "WARN" => "WARNING", "FATAL" => "CRITICAL", "ANY" => "DEFAULT" ).freeze # @private def call severity, time, progname, msg msg = Message.from msg time = msg.timestamp || time struct = { "severity" => CLOUD_SEVERITY[severity], "message" => msg.message, "timestamp" => { "seconds" => time.to_i, "nanos" => time.nsec } } struct.merge! msg.fields if msg.fields struct["logging.googleapis.com/sourceLocation"] = msg.source_location.to_h if msg.source_location struct["logging.googleapis.com/insertId"] = msg.insert_id if msg.insert_id struct["logging.googleapis.com/spanId"] = msg.span_id if msg.span_id struct["logging.googleapis.com/trace"] = msg.trace if msg.trace struct["logging.googleapis.com/traceSampled"] = msg.trace_sampled if msg.trace_sampled struct["logging.googleapis.com/labels"] = msg.labels if msg.labels struct["progname"] ||= progname if progname content = JSON.generate struct "#{content}\n" end end end end google-logging-utils-0.2.0/lib/google/logging/utils/0000755000004100000410000000000015143455142022413 5ustar www-datawww-datagoogle-logging-utils-0.2.0/lib/google/logging/utils/version.rb0000644000004100000410000000132215143455142024423 0ustar www-datawww-data# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module Google module Logging module Utils # Library version VERSION = "0.2.0" end end end google-logging-utils-0.2.0/lib/google/logging/utils.rb0000644000004100000410000000174315143455142022745 0ustar www-datawww-data# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require "google/logging/utils/version" require "google/logging/message" require "google/logging/source_location" require "google/logging/structured_formatter" ## # Google products namespace # module Google ## # Classes and utilities related to logging to and from Google products # module Logging ## # Logging utilities namespace # module Utils end end end google-logging-utils-0.2.0/lib/google/logging/source_location.rb0000644000004100000410000000567715143455142025007 0ustar www-datawww-data# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module Google module Logging ## # An object representing a source location as used by Google Logging. # class SourceLocation ## # Returns a SourceLocation corresponding to the caller. # This basically walks the stack trace backwards until it finds the # first entry not in the `google/logging/message.rb` source file or in # any of the other files optionally listed. # # @param locations [Array] The caller stack # to search. Optional; defaults to the current stack. # @param extra_depth [Integer] Optional extra steps backwards to walk. # Defaults to 0. # @param omit_files [Array] File paths to omit. # @return [SourceLocation,nil] The SourceLocation, or nil if none found. # def self.for_caller locations: nil, extra_depth: 0, omit_files: nil in_file = true omit_files = [__FILE__] + Array(omit_files) (locations || self.caller_locations).each do |loc| if in_file next if omit_files.any? { |pat| pat === loc.absolute_path } in_file = false end extra_depth -= 1 next unless extra_depth.negative? return new file: loc.path, line: loc.lineno.to_s, function: loc.base_label end nil end ## # Low-level constructor. # # @param file [String] Path to the source file. # @param line [String] Line number as a string. # @param function [String] Name of the calling function. # def initialize file:, line:, function: @file = file.to_s @line = line.to_s @function = function.to_s end # @return [String] Path to the source file. attr_reader :file # @return [String] Line number as a string. attr_reader :line # @return [String] Name of the calling function. attr_reader :function # @private def to_h { file: @file, line: @line, function: @function } end # @private def == other return false unless other.is_a? SourceLocation file == other.file && line == other.line && function == other.function end alias eql? == # @private def hash [file, line, function].hash end end end end google-logging-utils-0.2.0/lib/google/logging/message.rb0000644000004100000410000002333515143455142023232 0ustar www-datawww-data# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require "json" require "google/logging/source_location" module Google module Logging ## # A log message that can be formatted either as a normal text log entry or # as a structured log entry suitable for Google Cloud Logging. # # A log message has a "body" which consists of either a string message, a # JSON object (i.e. a Hash whose values are typically strings or numbers # but could be nested arrays and hashes), or both. It also includes several # additional optional fields used by the Google Cloud Logging backend. # # Most log formatters will render the message body as a string and ignore # the other attributes. The {StructuredFormatter}, however, will format the # full message data in the JSON format understood by the Google logging # agent. # class Message ## # Create a log message from an input object, which can be any of: # # * An existing Message object. # * A Hash. Symbol keys are used as keyword arguments to the # {Message#initialize} constructor. String keys are treated as fields # in the JSON payload. # * Any other object is converted to a string with `to_s` and used as a # simple text payload. # # @param input [Object] A log message input object. # @return [Message] # def self.from input case input when Hash kwargs = {} fields = nil input.each do |k, v| if k.is_a? Symbol kwargs[k] = v else (fields ||= {})[k.to_s] = v end end if kwargs[:fields] && fields kwargs[:fields].merge! fields else kwargs[:fields] ||= fields end new(**kwargs) when Message input else new message: input.to_s end end ## # Low-level constructor for a logging message. # All arguments are optional, with the exception that at least one of # `:message` and `:fields` must be provided. # # @param message [String] The main log message as a string. # @param fields [Hash{String=>Object}] The log message as a set of # key-value pairs representing a JSON object. # @param timestamp [Time,Numeric,:now] The timestamp for the log entry. # Can be provided as a Time object, a Numeric indicating the seconds # since epoch, or `:now` to use the current time. Optional. # @param source_location [SourceLocation,Hash,:caller,nil] The source # location for the log entry. Can be provided as a {SourceLocation} # object, a Hash containing exactly the keys `:file`, `:line`, and # `:function`, or `:caller` to use the location of the caller. # Optional. # @param insert_id [String] A unique ID for this log entry that could be # used on the backend to dedup messages. Optional. # @param trace [String] A Google Cloud Trace resource name. Optional. # @param span_id [String] The trace span containing this entry. Optional. # @param trace_sampled [boolean] Whether this trace is sampled. Optional. # @param labels [Hash{String=>String}] Optional metadata. # def initialize message: nil, fields: nil, timestamp: nil, source_location: nil, insert_id: nil, trace: nil, span_id: nil, trace_sampled: nil, labels: nil @fields = interpret_fields fields @message, @full_message = interpret_message message, @fields @timestamp = interpret_timestamp timestamp @source_location = interpret_source_location source_location @insert_id = interpret_string insert_id @trace = interpret_string trace @span_id = interpret_string span_id @trace_sampled = interpret_boolean trace_sampled @labels = interpret_labels labels end ## # @return [String] The message as a string. This is always present as a # nonempty string, and can be reliably used as the "display" of this # log entry in a list of entries. # attr_reader :message alias to_s message ## # @return [String] A full string representation of the message and fields # as rendered in the standard logger formatter. # attr_reader :full_message alias inspect full_message ## # @return [Hash{String=>Object},nil] The log message as a set of # key-value pairs, or nil if not present. # attr_reader :fields ## # @return [Time,nil] The timestamp for the log entry, or nil if not # present. # attr_reader :timestamp ## # @return [SourceLocation,nil] The source location for the log entry, or # nil if not present. # attr_reader :source_location ## # @return [String,nil] The unique ID for this log entry that could be # used on the backend to dedup messages, or nil if not present. # attr_reader :insert_id ## # @return [String,nil] The Google Cloud Trace resource name, or nil if # not present. # attr_reader :trace ## # @return [String,nil] The trace span containing this entry, or nil if # not present. # attr_reader :span_id ## # @return [true,false,nil] Whether this trace is sampled, or nil if not # present or known. # attr_reader :trace_sampled alias trace_sampled? trace_sampled ## # @return [Hash{String=>String},nil] Metadata, or nil if not present. # attr_reader :labels ## # @return [Hash] A hash of kwargs that can be passed to the constructor # to clone this message. # def to_h { message: @message, fields: @fields.dup, timestamp: @timestamp, source_location: @source_location, insert_id: @insert_id, trace: @trace, span_id: @span_id, trace_sampled: @trace_sampled, labels: @labels.dup } end # @private def == other return false unless other.is_a? Message message == other.message && fields == other.fields && timestamp == other.timestamp && source_location == other.source_location && insert_id == other.insert_id && trace == other.trace && span_id == other.span_id && trace_sampled? == other.trace_sampled? && labels == other.labels end alias eql? == # @private def hash [message, fields, timestamp, source_location, insert_id, trace, span_id, trace_sampled, labels].hash end private # @private DISALLOWED_FIELDS = [ "severity", "message", "log", "httpRequest", "timestamp" ].freeze private_constant :DISALLOWED_FIELDS def interpret_fields fields return nil if fields.nil? fields = normalize_json fields fields.each_key do |key| if DISALLOWED_FIELDS.include?(key) || key.start_with?("logging.googleapis.com/") raise ArgumentError, "Field key not allowed: #{key}" end end fields end def normalize_json input case input when Hash input.to_h { |k, v| [k.to_s, normalize_json(v)] } when Array input.map { |v| normalize_json v } when Integer, Float, nil, true, false input when Rational if input.denominator == 1 input.numerator else input.to_f end else input.to_s end end def interpret_message message, fields if message message = message.to_s full_message = fields ? "#{message} -- #{JSON.generate fields}" : message [message, full_message] else fields_json = JSON.generate fields [fields_json, fields_json] end end def interpret_timestamp timestamp case timestamp when Time timestamp when Numeric Time.at timestamp when :now Time.now.utc end end def interpret_source_location source_location case source_location when SourceLocation source_location when Hash SourceLocation.new(**source_location) when :caller SourceLocation.for_caller omit_files: [__FILE__] end end def interpret_string input input&.to_s end def interpret_boolean input return nil if input.nil? input ? true : false end def interpret_labels input return nil if input.nil? input.to_h do |k, v| v_converted = case v when Array, Hash JSON.generate v else v.to_s end [k.to_s, v_converted] end end end end end google-logging-utils-0.2.0/lib/google-logging-utils.rb0000644000004100000410000000117615143455142022741 0ustar www-datawww-data# frozen_string_literal: true # Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require "google/logging/utils" google-logging-utils-0.2.0/CODE_OF_CONDUCT.md0000644000004100000410000000367515143455142020415 0ustar www-datawww-data# Contributor Code of Conduct As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery * Personal attacks * Trolling or insulting/derogatory comments * Public or private harassment * Publishing other's private information, such as physical or electronic addresses, without explicit permission * Other unethical or unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) google-logging-utils-0.2.0/LICENSE0000644000004100000410000002613615143455142016620 0ustar www-datawww-data Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. google-logging-utils-0.2.0/README.md0000644000004100000410000000201315143455142017056 0ustar www-datawww-data# Logging utilities for Google Cloud Utility classes for logging to Google Cloud Logging. ## Supported Ruby Versions This library is supported on Ruby 3.0+. Google provides official support for Ruby versions that are actively supported by Ruby Core—that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 3.0 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule. ## Contributing Contributions to this library are always welcome and highly encouraged. See the {file:CONTRIBUTING.md CONTRIBUTING} documentation for more information on how to get started. ## Versioning This library is currently a **preview** with no guarantees of stability or support. Please get involved and let us know if you find it useful and we'll work towards a stable version. ## Disclaimer This is not an official Google product. google-logging-utils-0.2.0/CHANGELOG.md0000644000004100000410000000053015143455142017412 0ustar www-datawww-data## Changelog ### 0.2.0 (2025-04-30) #### Features * Updated required Ruby version to 3.1 ([#29](https://github.com/googleapis/ruby-core-libraries/issues/29)) ### 0.1.0 (2024-08-27) #### Features * Initial release with Google log message class and structured formatter ([#11](https://github.com/googleapis/ruby-core-libraries/issues/11))