diff --git a/lib/fluent/plugin_helper/http_server/server.rb b/lib/fluent/plugin_helper/http_server/server.rb index 3d54aa3ba4..1434df2f5f 100644 --- a/lib/fluent/plugin_helper/http_server/server.rb +++ b/lib/fluent/plugin_helper/http_server/server.rb @@ -55,10 +55,13 @@ def initialize(addr:, port:, logger:, default_app: nil, tls_context: nil) end def start(notify = nil) + Console.logger = Fluent::Log::ConsoleAdapter.wrap(@logger) @logger.debug("Start async HTTP server listening #{@uri}") Async do |task| + Console.logger = Fluent::Log::ConsoleAdapter.wrap(@logger) @server_task = task.async do + Console.logger = Fluent::Log::ConsoleAdapter.wrap(@logger) @server.run end if notify diff --git a/test/plugin_helper/test_http_server_helper.rb b/test/plugin_helper/test_http_server_helper.rb index f2d2d1c9aa..c198a364f1 100644 --- a/test/plugin_helper/test_http_server_helper.rb +++ b/test/plugin_helper/test_http_server_helper.rb @@ -133,6 +133,7 @@ def start_https_request(addr, port, verify: true, cert_path: nil, selfsigned: tr error = nil Async do + Console.logger = Fluent::Log::ConsoleAdapter.wrap(NULL_LOGGER) begin response = yield(client) rescue => e # Async::Reactor rescue all error. handle it by myself