Back logging

master
Alexey Berezhok 6 days ago
parent 934b3f032e
commit 7e20ea09db

@ -35,17 +35,17 @@ require_relative 'models/userdata'
require_relative 'classes/cert'
require_relative 'classes/pagination'
# configure do
# Dir.mkdir('logs') unless Dir.exist?('logs')
# unless File.exist?('logs/actions.log')
# File.new('logs/actions.log', 'w').close
# end
# log_file = File.open('logs/actions.log', 'a+')
# STDOUT.reopen(log_file)
# STDERR.reopen(log_file)
# STDOUT.sync = true
# STDERR.sync = true
# end
configure do
Dir.mkdir('logs') unless Dir.exist?('logs')
unless File.exist?('logs/actions.log')
File.new('logs/actions.log', 'w').close
end
log_file = File.open('logs/actions.log', 'a+')
STDOUT.reopen(log_file)
STDERR.reopen(log_file)
STDOUT.sync = true
STDERR.sync = true
end
set :bind, IPBIND
set :port, PORT

Loading…
Cancel
Save