lib/google/cloud/logging/middleware.rb in google-cloud-logging-2.1.0 vs lib/google/cloud/logging/middleware.rb in google-cloud-logging-2.2.0

- old
+ new

@@ -55,11 +55,11 @@ # Google::Cloud::Logging::Middleware instance # def initialize app, logger: nil, on_init: nil, **kwargs @app = app - load_config kwargs + load_config(**kwargs) logger ||= Middleware.logger logger ||= begin log_name = configuration.log_name logging = Logging.new project_id: configuration.project_id, @@ -69,10 +69,10 @@ configuration.monitored_resource.labels ) Middleware.logger = logging.logger log_name, resource end - on_init.call if on_init + on_init&.call @logger = logger end ##