Disable logging

This commit is contained in:
Alex Kotov 2023-05-02 18:22:09 +04:00
parent 5fb5be3375
commit 43565636e6
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 17 additions and 0 deletions

View file

@ -1,9 +1,23 @@
# frozen_string_literal: true # frozen_string_literal: true
####################
# Standard library #
####################
require 'logger'
########
# Gems #
########
require 'rack' require 'rack'
require 'sinatra/base' require 'sinatra/base'
require 'webrick' require 'webrick'
################
# Own requires #
################
require_relative 'diversipub/main' require_relative 'diversipub/main'
require_relative 'diversipub/rack_app' require_relative 'diversipub/rack_app'
require_relative 'diversipub/sinatra_app' require_relative 'diversipub/sinatra_app'

View file

@ -65,7 +65,10 @@ module Diversipub
def webrick_options def webrick_options
@webrick_options ||= { @webrick_options ||= {
AccessLog: [],
BindAddress: 'localhost', BindAddress: 'localhost',
DocumentRoot: nil,
Logger: Logger.new(File.open('/dev/null', 'w')),
Port: 8080, Port: 8080,
}.freeze }.freeze
end end