Project

logcli

0.0
No commit activity in last 3 years
No release in over 3 years
CLI utility for helping works with logs
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

>= 1.2.1, ~> 1.2.1
>= 5.0.2, ~> 5.0.2
~> 0.20.3
 Project Readme

Logcli

logcli is tool for easy working with logs but its opionated my work flow to working with logs looks like fetch json logs from lines and than push it to elasticsearch for future analytics my logs stored as JSON objects. Example how my logs look like

I, [2019-05-09T17:00:16.049805 #57671]  INFO -- : {"evt_type":"FileUpload":"info","time":"2019-05-09T15:00:16+0000","payload":{"time_elapsed_human":"00:00:00.874","time_elapsed":0.874553},"trace_id":"cd5916a6-14b7-4628-bdda-334e4285a4e0"}

as you can see there a log prefixer like I, [2019-05-09T17:00:16.049805 #57671] INFO -- : that's why its not a JSON but than goes a JSON object that I want to extract I'm using this command to extract JSON from log line

logcli extract_json --filenames=log1.log log2.log

as result tool create in the SAME directory files with names log1_json.log, log2_json.log

than I'm push data to ES for analytics using ES + Kibana

logcli elasticsearch --filenames=events_json.log --elasticsearch_url=http://localhost:9201
logcli --help #for more command line options

tool using batch API and push 100 records and the time

Pretty dummy stuff hah

Development

In active - passive development

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/logcli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Logcli project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.