Comments (16)
This is most likely down to how you've configured your custom_options
for the @timestamp
element. Can you share your configuration?
from lograge.
@benlovell thanks for the quick reply. Sure, here is the config:
# lograge
config.lograge.enabled = true
config.lograge.custom_options = lambda do | event |
{:name => Rails.env, :session => event.payload[:session], :host => event.payload[:host]}
end
config.lograge.formatter = Lograge::Formatters::Logstash.new
This is the same for all environments. As you can see, I did not specifically configure the @timestamp
attribute. I assumed that Lograge::Formatters::Logstash.new
will create the correct format.
from lograge.
Hmm. Thanks for the info.
It looks to me like this is something going down in https://github.com/elasticsearch/logstash/blob/v1.1.5/lib/logstash/event.rb
We really should bump our logstash-event
dependency as it's quite outdated now. I'll investigate this.
from lograge.
@benlovell thank's a lot! <3
from lograge.
No problem, thanks for reporting 😍
from lograge.
@benlovell did you already have a chance to look into this? Thanks for everything ;-)
from lograge.
@andywenk I didn't yet, but it's definitely on my radar.
from lograge.
cool - thanks a lot :D
On 15 December 2014 at 15:17, Ben Lovell [email protected] wrote:
@andywenk https://github.com/andywenk I didn't yet, but it's definitely
on my radar.—
Reply to this email directly or view it on GitHub
#95 (comment).
Andy Wenk
Hamburg - Germany
RockIt!
http://www.couchdb-buch.de
http://www.pg-praxisbuch.de
GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
https://people.apache.org/keys/committer/andywenk.asc
from lograge.
It seems this is fixed in the 1.2.x
version: https://github.com/elasticsearch/logstash/blob/v1.2.2/lib/logstash/event.rb
I don't see where lograge is enforcing any version of logstash-event
except for the tests.
from lograge.
@andywenk is the current master 940cba8 working for you?
from lograge.
it should look like this I think:
https://github.com/elasticsearch/logstash/blob/v1.2.2/lib/logstash/event.rb#L37
But what I have when using master from github is:
{
...
"@timestamp": "2015/02/08 14:13:39 +0000",
"@version": "1",
"message": "[200] GET /warenkorb (carts#show)"
}
The configuration from above is the same. Am I missing something? Am I the only one with this problem?
Thanks a lot for looking into this ;-)
from lograge.
ok it is a bit clearer now. I created a new application and used the same settings and there it is working:
{
"@timestamp": "2015-02-08T14:45:26.847Z",
"@version": "1",
"message": "[200] GET / (start#index)"
}
I think some other gem is doing bad things so that it does not work correctly. I will investigate this further and let you know. If it matters, you can close this issue.
Thanks for everything!
from lograge.
As lograge doesn't do anything about the date format I suggest checking the gems then too.
I am closing this issue for now. But please feel free to report the result of your research in this ticket.
from lograge.
@pxlpnk the problem is couch_potato which is monkey patching Date globally.
I will close this now ;-)
from lograge.
Thank you for investigating this!
from lograge.
you're welcome ;-)
from lograge.
Related Issues (20)
- Why are we striping params for redirect url?
- [Question] Project status HOT 2
- Monkey patching of Rails::Rack::Logger#call_app loses request.action_dispatch instrumentation HOT 1
- [Question] Logstash-event loaded from gh
- How to add extra log payload in action cable?
- Rails support HOT 1
- Should we demote some of our formatters to "contrib"?
- Unable to Filter ActionCable Params HOT 2
- exception cannot show on rescue_from custom handler exception HOT 1
- custom_payload is "persisted' (or per se kept) between 2 requests HOT 4
- Request: new gem release HOT 5
- Any thoughts on supporting `Turbo::StreamsChannel`? HOT 1
- Sinatra support? HOT 1
- Simpler way to remove all log subscribers. HOT 3
- Redirect in routes not handled by lograge
- Confused about what Rails logging is eliminated HOT 1
- ActionView logs not completely suppressed with Rails 7.1+
- TypeError: no implicit conversion of String into Integer when adding lograge to Rails project with Rack 3.0.9 and Puma 6.4.2 HOT 3
- Suggestion from Rails regarding better patching mechanism
- All logs show as INFO
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lograge.