Add support for generating logstash friendly logs
This commit is contained in:
parent
29e364d585
commit
82cefb5929
4 changed files with 19 additions and 0 deletions
3
Gemfile
3
Gemfile
|
@ -85,6 +85,9 @@ gem "soap4r-ruby1.9"
|
||||||
gem "dalli"
|
gem "dalli"
|
||||||
gem "kgio"
|
gem "kgio"
|
||||||
|
|
||||||
|
# Used to generate logstash friendly log files
|
||||||
|
gem "logstasher"
|
||||||
|
|
||||||
# Gems useful for development
|
# Gems useful for development
|
||||||
group :development do
|
group :development do
|
||||||
gem "vendorer"
|
gem "vendorer"
|
||||||
|
|
|
@ -123,6 +123,10 @@ GEM
|
||||||
tilt
|
tilt
|
||||||
libv8 (3.16.14.11)
|
libv8 (3.16.14.11)
|
||||||
libxml-ruby (2.8.0)
|
libxml-ruby (2.8.0)
|
||||||
|
logstash-event (1.2.02)
|
||||||
|
logstasher (0.6.5)
|
||||||
|
logstash-event (~> 1.2.0)
|
||||||
|
request_store
|
||||||
loofah (2.0.2)
|
loofah (2.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.6.3)
|
mail (2.6.3)
|
||||||
|
@ -225,6 +229,7 @@ GEM
|
||||||
rake (10.4.2)
|
rake (10.4.2)
|
||||||
redcarpet (3.3.2)
|
redcarpet (3.3.2)
|
||||||
ref (2.0.0)
|
ref (2.0.0)
|
||||||
|
request_store (1.2.0)
|
||||||
rest-client (1.8.0)
|
rest-client (1.8.0)
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 3.0)
|
mime-types (>= 1.16, < 3.0)
|
||||||
|
@ -317,6 +322,7 @@ DEPENDENCIES
|
||||||
kgio
|
kgio
|
||||||
konacha
|
konacha
|
||||||
libxml-ruby (>= 2.0.5)
|
libxml-ruby (>= 2.0.5)
|
||||||
|
logstasher
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
oauth-plugin (>= 0.5.1)
|
oauth-plugin (>= 0.5.1)
|
||||||
omniauth
|
omniauth
|
||||||
|
|
|
@ -48,5 +48,13 @@ module OpenStreetMap
|
||||||
if defined?(MEMCACHE_SERVERS)
|
if defined?(MEMCACHE_SERVERS)
|
||||||
config.cache_store = :mem_cache_store, MEMCACHE_SERVERS, { :namespace => "rails:cache" }
|
config.cache_store = :mem_cache_store, MEMCACHE_SERVERS, { :namespace => "rails:cache" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Use logstash for logging if required
|
||||||
|
if defined?(LOGSTASH_PATH)
|
||||||
|
config.logstasher.enabled = true
|
||||||
|
config.logstasher.suppress_app_log = false
|
||||||
|
config.logstasher.logger_path = LOGSTASH_PATH
|
||||||
|
config.logstasher.log_controller_parameters = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -63,6 +63,8 @@ defaults: &defaults
|
||||||
attachments_dir: ":rails_root/public/attachments"
|
attachments_dir: ":rails_root/public/attachments"
|
||||||
# Log file to use
|
# Log file to use
|
||||||
#log_path: ""
|
#log_path: ""
|
||||||
|
# Log file to use for logstash
|
||||||
|
#logstash_path: ""
|
||||||
# List of memcache servers to use for caching
|
# List of memcache servers to use for caching
|
||||||
#memcache_servers: []
|
#memcache_servers: []
|
||||||
# Enable legacy OAuth 1.0 support
|
# Enable legacy OAuth 1.0 support
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue