From 1c134cd7bf9d0734037fddb2dbe3c2477e73f141 Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:04:11 -0400 Subject: [PATCH 1/8] Require stdlib logger instead of the logging gem --- lib/viewpoint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/viewpoint.rb b/lib/viewpoint.rb index 4d858f62..4e9f8f2d 100644 --- a/lib/viewpoint.rb +++ b/lib/viewpoint.rb @@ -21,7 +21,7 @@ require 'base64' require 'nokogiri' require 'ostruct' -require 'logging' +require 'logger' unless defined?(Logger) # String utilities require 'viewpoint/string_utils' From dda7321be75cb952b848595810f07d2edb64270d Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:04:13 -0400 Subject: [PATCH 2/8] Reimplement root logger on stdlib Logger --- lib/viewpoint/logging.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/viewpoint/logging.rb b/lib/viewpoint/logging.rb index 82d5f4d0..fda75a8b 100644 --- a/lib/viewpoint/logging.rb +++ b/lib/viewpoint/logging.rb @@ -16,13 +16,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +require 'logger' unless defined?(Logger) + module Viewpoint # Exchange Web Services (EWS) client namespace. module EWS attr_reader :logger + @root_logger = Logger.new(STDOUT) + @root_logger.level = Logger::WARN + def self.root_logger - Logging.logger.root + @root_logger end end end From 7884871beeaebc5071d8f6f1c08f9202b1f22f42 Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:04:16 -0400 Subject: [PATCH 3/8] Configure stdlib root logger for debug output --- lib/viewpoint/logging/config.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/viewpoint/logging/config.rb b/lib/viewpoint/logging/config.rb index b1709d35..509ea8e5 100644 --- a/lib/viewpoint/logging/config.rb +++ b/lib/viewpoint/logging/config.rb @@ -19,7 +19,6 @@ module Viewpoint # Exchange Web Services (EWS) client namespace. module EWS - Logging.logger.root.level = :debug - Logging.logger.root.appenders = Logging.appenders.stdout + root_logger.level = Logger::DEBUG end end From 5dd21d76bc786094de48cb8373dbee9fef481246 Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:04:18 -0400 Subject: [PATCH 4/8] Use the shared stdlib root logger --- lib/ews/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ews/connection.rb b/lib/ews/connection.rb index 9dd2b831..ad526a99 100644 --- a/lib/ews/connection.rb +++ b/lib/ews/connection.rb @@ -39,7 +39,7 @@ class Connection # @option opts [Array] :trust_ca an array of hashed dir paths or a file # @option opts [String] :user_agent the http user agent to use in all requests def initialize(endpoint, opts = {}) - @log = Logging.logger[self.class.name.to_s.to_sym] + @log = Viewpoint::EWS.root_logger httpclient_opts = opts.slice(*SUPPORTED_HTTPCLIENT_OPTS) @httpcli = HTTPClient.new(**httpclient_opts) From 30fc0a164ffeb7d4784a7f1bc5430e8cf75b8774 Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:04:20 -0400 Subject: [PATCH 5/8] Use the shared stdlib root logger --- lib/ews/connection_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ews/connection_helper.rb b/lib/ews/connection_helper.rb index fa4954b6..4c50d41b 100644 --- a/lib/ews/connection_helper.rb +++ b/lib/ews/connection_helper.rb @@ -21,7 +21,7 @@ module EWS # Helpers for building authenticated HTTP connections. module ConnectionHelper def init_logging! - @log = Logging.logger[self.class.name.to_s.to_sym] + @log = Viewpoint::EWS.root_logger end # @param [String] xml to parse the errors from. From 3b646bc25f35a59eb227faf96c4ff3e02915da66 Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:04:22 -0400 Subject: [PATCH 6/8] Use the shared stdlib root logger --- lib/ews/soap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ews/soap.rb b/lib/ews/soap.rb index c15930ab..3a3d7fd0 100644 --- a/lib/ews/soap.rb +++ b/lib/ews/soap.rb @@ -57,7 +57,7 @@ module SOAP MOVE_TO_DELETED_ITEMS = 'MoveToDeletedItems' def initialize - @log = Logging.logger[self.class.name.to_s.to_sym] + @log = Viewpoint::EWS.root_logger @default_ns = NAMESPACES["xmlns:#{NS_EWS_MESSAGES}"] end end From 8fe341f531241c36fb171885868069479617ea11 Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 14:04:24 -0400 Subject: [PATCH 7/8] Replace logging gem dependency with stdlib logger --- viewpoint.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/viewpoint.gemspec b/viewpoint.gemspec index a11c6890..de9ca2f7 100644 --- a/viewpoint.gemspec +++ b/viewpoint.gemspec @@ -26,7 +26,8 @@ Gem::Specification.new do |s| s.extra_rdoc_files = %w[README.md] s.add_runtime_dependency 'httpclient' - s.add_runtime_dependency 'logging' + # logger is no longer a bundled gem on Ruby 4.0 + s.add_runtime_dependency 'logger' s.add_runtime_dependency 'mutex_m' s.add_runtime_dependency 'nokogiri', '!=1.12.3', '!=1.12.2', '!=1.12.1', '!=1.12.0' s.add_runtime_dependency 'rubyntlm' From d737f47d57af6945ef5377781da75914354a28ce Mon Sep 17 00:00:00 2001 From: Peter Cai <222655+pcai@users.noreply.github.com> Date: Mon, 14 Sep 2026 16:05:24 -0400 Subject: [PATCH 8/8] Use $stdout instead of STDOUT (standardrb) --- lib/viewpoint/logging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/viewpoint/logging.rb b/lib/viewpoint/logging.rb index fda75a8b..3e4797b5 100644 --- a/lib/viewpoint/logging.rb +++ b/lib/viewpoint/logging.rb @@ -23,7 +23,7 @@ module Viewpoint module EWS attr_reader :logger - @root_logger = Logger.new(STDOUT) + @root_logger = Logger.new($stdout) @root_logger.level = Logger::WARN def self.root_logger