From 43565636e60afa14f2c785b83e779e827504601c Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Tue, 2 May 2023 18:22:09 +0400 Subject: [PATCH] Disable logging --- lib/diversipub.rb | 14 ++++++++++++++ lib/diversipub/main.rb | 3 +++ 2 files changed, 17 insertions(+) diff --git a/lib/diversipub.rb b/lib/diversipub.rb index 5fe8eb3..b35b4a2 100644 --- a/lib/diversipub.rb +++ b/lib/diversipub.rb @@ -1,9 +1,23 @@ # frozen_string_literal: true +#################### +# Standard library # +#################### + +require 'logger' + +######## +# Gems # +######## + require 'rack' require 'sinatra/base' require 'webrick' +################ +# Own requires # +################ + require_relative 'diversipub/main' require_relative 'diversipub/rack_app' require_relative 'diversipub/sinatra_app' diff --git a/lib/diversipub/main.rb b/lib/diversipub/main.rb index 74a9ca3..6a6ac14 100644 --- a/lib/diversipub/main.rb +++ b/lib/diversipub/main.rb @@ -65,7 +65,10 @@ module Diversipub def webrick_options @webrick_options ||= { + AccessLog: [], BindAddress: 'localhost', + DocumentRoot: nil, + Logger: Logger.new(File.open('/dev/null', 'w')), Port: 8080, }.freeze end