Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishotihadus/google_cloud_logging_extension
Extension of google-cloud-logging gem.
https://github.com/ishotihadus/google_cloud_logging_extension
Last synced: about 2 months ago
JSON representation
Extension of google-cloud-logging gem.
- Host: GitHub
- URL: https://github.com/ishotihadus/google_cloud_logging_extension
- Owner: Ishotihadus
- License: mit
- Created: 2022-06-01T14:16:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-05T06:49:07.000Z (over 2 years ago)
- Last Synced: 2024-11-09T00:46:54.837Z (2 months ago)
- Language: Ruby
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# GoogleCloudLoggingExtension
Extension of google-cloud-logging gem.
This extension provides `Google::Cloud::Logging.create` method.
This gem also converts exceptions into json payload.
## Installation
Install the gem and add to the application's Gemfile by executing:
$ bundle add google_cloud_logging_extension
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install google_cloud_logging_extension
## Usage
### Use default extension
```ruby
require 'google_cloud_logging_extension'logger = Google::Cloud::Logging.create('test')
# logger = Google::Cloud::Logging.create('test', 'gce_project', hoge: 'fuga')logger.info('hoge')
begin
5 / 0
rescue
logger.error($!)
end
```### Use roda plugin
```ruby
require 'google_cloud_logging_extension/roda_plugin'class App < Roda
plugin :google_cloud_logging, log_name: 'name', labels: { hoge: 'fuga' }
end
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ishotihadus/google_cloud_logging_extension.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).