blob: ee31f151a481d5166b6717b77cb7ec9298fff5c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#
# For use with Phusion Passenger
#
require 'sinatra'
require './taginfo.rb'
require 'json'
require 'lib/config.rb'
TaginfoConfig.read
LOGDIR=TaginfoConfig.get('logging.directory', '/osm/taginfo/var/log');
set :run, false
set :environment, :production
today = Time.now.strftime('%Y-%m-%d')
log = File.new("#{LOGDIR}/taginfo-#{ today }.log", "a")
log.sync = true
# https://github.com/joto/taginfo/issues/34
#$stdout.reopen(log)
$stderr.reopen(log)
$stderr.puts "Taginfo started #{Time.now}"
$queries_log = File.new("#{LOGDIR}/queries-#{ today }.log", "a")
$queries_log.sync = true
run Taginfo
|