1) The decoder has several issues.
- replace 'null' with 'nil'
- if a '@timestamp' field doesn't exist (or is not a string) in the JSON the 
decoder will terminate
- inject_message should be wrapped in a pcall (since you are converting an 
untrusted json structure)
- if you are using Heka 0.6+ you will want to wrap the json.decode in a pcall

2) There is already an open issue for FileOutput log rolling: 
https://github.com/mozilla-services/heka/issues/976. Please feel free to +1 it.

Thanks,
Trink

----- Original Message -----
> From: "Sebastian Kurfürst" <[email protected]>
> To: [email protected]
> Sent: Thursday, July 31, 2014 6:32:55 AM
> Subject: [heka] FileOutput with rolling files?
> 
> Hey everybody,
> 
> I am currently starting to use Heka in production for us internally. We
> are having a distributed system in Java which uses Logback for logging
> -- I am now using a Logback backend to output JSON [1], and re-import
> this with a LuaDecoder into Heka which I have uploaded at [2].
> 
> Basically, I'd then want to stream this to a centralized Heka instance.
> Would this be the way to go in terms of general system setup?
> 
> 
> Furthermore, it would help for debugging if the debug log of the latest
> hour/day would also be available as a simple text file. For me, it would
> be very nice if I could use the FileOutput of Heka to create e.g. one
> log-file per-day, with the option of cleaning that up afterwards as
> well. As far as I see, this is currently not possible; does that
> approach even make sense, or is this just a missing feature?
> 
> Thanks in advance and greets, Sebastian
> 
> 
> [1] https://github.com/logstash/logstash-logback-encoder
> [2] https://gist.github.com/skurfuerst/77f2b12c31f5327b4eba
> 
> _______________________________________________
> Heka mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/heka
> 
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to