I am getting a set of logs from one application (in a txt file) and I have to separate, process and then send them one by one to another app. The format of the logs that I'm receiving is like this:

2019-05-07 10:46:49,532 [6] INFO App1 - Message1
2019-05-07 10:46:51,532 [6] INFO App1 - Message2

And I have to send them one by one as a JSON object in this format:

"logMessage":"This is the error we received!"

Is there any library that could help me? Thanks in advance!

1 Answer 1


Logstash is a tool to process and transform data from multiple sources.

As you might guess from the name, is mainly used to extract and format data from logs and send it to a storage (e.g: Elastic Search).

It is configured using a DSL with the following components:

  • inputs: it could be a file in you example

  • filters: for instance, grok, that allows you to extract data using regular expressions

  • outputs: also a file for your case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.