Closed lpichler closed 3 years ago
This PR replaces manageiq-loggers gem with insights-loggers-ruby gem.
manageiq-loggers
Usage is proper in rails applications:
app_name = "sources-api" Insights::API::Common::Logging.activate(config, app_name)
This changes allows to support haberdasher and in order to use haberdasher, LOG_HANDLER environment variable needs to be set:
LOG_HANDLER
ENV['LOG_HANDLER'] = 'haberdasher'
app_name - optional parameter to set app_name - which is need for identification of source log message and it will be visible in tags and labels.
app_name
tags
labels
Uses logger Insights::Loggers::CloudWatch instead of ManageIQ::Loggers::CloudWatch. Insights::Loggers::CloudWatch we can control log levels:
Insights::Loggers::CloudWatch
ManageIQ::Loggers::CloudWatch
ENV['CONTAINER_LOG_LEVEL']
ENV['LOG_LEVEL']
https://issues.redhat.com/browse/RHCLOUD-13925
Checked commit https://github.com/lpichler/manageiq-api-common/commit/42a5022f5a8c24ff6fb1ed4b5ecc85963ab4a1db with ruby 2.5.7, rubocop 0.82.0, haml-lint 0.35.0, and yamllint 2 files checked, 0 offenses detected Everything looks fine. :cookie:
This PR replaces
manageiq-loggers
gem with insights-loggers-ruby gem.Usage is proper in rails applications:
This changes allows to support haberdasher and in order to use haberdasher,
LOG_HANDLER
environment variable needs to be set:app_name
- optional parameter to set app_name - which is need for identification of source log message and it will be visible intags
andlabels
.Uses logger
Insights::Loggers::CloudWatch
instead ofManageIQ::Loggers::CloudWatch
.Insights::Loggers::CloudWatch
we can control log levels:ENV['CONTAINER_LOG_LEVEL']
ENV['LOG_LEVEL']
Links
https://issues.redhat.com/browse/RHCLOUD-13925