wr0ngway / log4r-gelf Goto Github PK
View Code? Open in Web Editor NEWA Log4r appender for logging to a gelf sink, e.g. the graylog2 server
License: MIT License
A Log4r appender for logging to a gelf sink, e.g. the graylog2 server
License: MIT License
We're using Log4r with Logstash via Gelf. Is there a reason that "we" couldn't support tags? http://logstash.net/docs/1.2.2/inputs/gelf#tags
Hey,
I'm getting this exception:
NoMethodError (undefined method bytesize' for #<Log4r::GelfOutputter:0x000000041b09a0>): rack (1.5.2) lib/rack/utils.rb:335:in
bytesize'
sinatra (1.4.3) lib/sinatra/base.rb:147:in block in finish' sinatra (1.4.3) lib/sinatra/base.rb:147:in
each'
sinatra (1.4.3) lib/sinatra/base.rb:147:in inject' sinatra (1.4.3) lib/sinatra/base.rb:147:in
finish'
sinatra (1.4.3) lib/sinatra/base.rb:893:in call!' sinatra (1.4.3) lib/sinatra/base.rb:870:in
call'
newrelic_rpm (3.6.8.164) lib/new_relic/rack/error_collector.rb:43:in call' newrelic_rpm (3.6.8.164) lib/new_relic/rack/browser_monitoring.rb:16:in
call'
newrelic_rpm (3.6.8.164) lib/new_relic/rack/agent_hooks.rb:22:in call' rack-cache (1.2) lib/rack/cache/context.rb:136:in
forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in fetch' rack-cache (1.2) lib/rack/cache/context.rb:185:in
lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in call!' rack-cache (1.2) lib/rack/cache/context.rb:51:in
call'
rack (1.5.2) lib/rack/nulllogger.rb:9:in call' rack (1.5.2) lib/rack/head.rb:11:in
call'
sinatra (1.4.3) lib/sinatra/base.rb:175:in call' sinatra (1.4.3) lib/sinatra/base.rb:1949:in
call'
sinatra (1.4.3) lib/sinatra/base.rb:1449:in block in call' sinatra (1.4.3) lib/sinatra/base.rb:1726:in
synchronize'
sinatra (1.4.3) lib/sinatra/base.rb:1449:in call' actionpack (4.0.0) lib/action_dispatch/journey/router.rb:71:in
block in call'
actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in each' actionpack (4.0.0) lib/action_dispatch/journey/router.rb:59:in
call'
actionpack (4.0.0) lib/action_dispatch/routing/route_set.rb:655:in call' newrelic_rpm (3.6.8.164) lib/new_relic/rack/error_collector.rb:43:in
call'
newrelic_rpm (3.6.8.164) lib/new_relic/rack/agent_hooks.rb:22:in call' newrelic_rpm (3.6.8.164) lib/new_relic/rack/browser_monitoring.rb:16:in
call'
rack-jsonp-middleware (0.0.9) lib/rack/jsonp.rb:24:in `call'
...
Does anyone know what this could be?
Versions are: Ruby 1.9.3, Rails 4, gelf (1.4.0), log4r-gelf (0.9.0)
Thanks a lot!
Christoph
log4r-gelf has a dependency on gelf ~> 1.1.3, while graylog2_exceptions has a dependency on gelf 1.3. Since these two conflict, they can't both be installed at the same time.
gelf_outputter.rb has lines like:
opts['host'] = hash[:host] if hash[:host]
but hash is a Hash, not a HashWithIndifferentAccess. Therefore, options from log4r.yaml are ignored unless specified as symbols. You can either change the gelf_outputter to be like
opts['host'] = hash['host'] if hash['host']
or change the documentation to say :facility instead of facility in yaml. I vote for the former.
Which graylog input type should I choose? I've got my other input using GELF UDP, is there a preferred input type for log4r-gelf?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.