Comments (6)
For this purpose I have this https://github.com/antonmedv/eat
from fx.
Hum... not quite. That supports eating a whole file. Iโm hoping to support interspersed text in the JSON. We have logs that are a mix of plain text and JSON
from fx.
Can you show an example?
from fx.
This is a REST backend service with a proxy in front of it. The proxy does plain text logging and the backend does JSON logging. The logs are streamed together from a kubernetes POD and a request looks like:
{
"comment": "",
"fields.time": "2019-01-20T22:32:38Z",
"ip": "100.65.12.18",
"latency": " 21.215983ms",
"level": "info",
"method": "PUT",
"msg": "[GIN] --------------------------------------------------------------- GinLogrusWithTracing ----------------------------------------------------------------",
"path": "/products/manasi-test-id",
"requestID": "36763cff53b68dce:532fdd959b064e8a:56b5f4bdec9a08af:0",
"status": 200,
"time": "2019-01-20T22:32:38Z",
"user-agent": "Go-http-client/1.1"
}
time="2019-01-20T22:32:38Z" level=info msg="proxyRequest took 27.679495ms" path=/products/manasi-test-id x-service-ticket=true requestID="36763cff53b68dce:393a4a39863433af:319aaa8a29f1957a:0" method=PUT
time="2019-01-20T22:32:38Z" level=debug msg="updateMetrics: proxyRequest / 31ms / 27.679495ms" path=/products/manasi-test-id x-service-ticket=true requestID="36763cff53b68dce:393a4a39863433af:319aaa8a29f1957a:0" method=PUT
time="2019-01-20T22:32:38Z" level=info msg="updateMetrics took 1.058ยตs" requestID="36763cff53b68dce:393a4a39863433af:319aaa8a29f1957a:0" method=PUT path=/products/manasi-test-id x-service-ticket=true
time="2019-01-20T22:32:38Z" level=info msg="[GIN] --------------------------------------------------------------- GinLogrusWithTracing ----------------------------------------------------------------" path=/products/manasi-test-id latency=" 28.62963ms" user-agent=Go-http-client/1.1 requestID="36763cff53b68dce:7fc8d054c277ae01:393a4a39863433af:0" status=200 comment= method=PUT ip=100.65.12.18 time="2019-01-20T22:32:38Z"
from fx.
you can see the mix content. it would be great if fx just wrapped the plain text in some sort of default JSON object or just ignored it.
from fx.
I think this can go inside eat tool to, if you can write a parser for it.
from fx.
Related Issues (20)
- How do I set a theme? HOT 1
- can not copy by yy/yp/yk in ssh HOT 2
- Support streams of JSON objects HOT 4
- Node.js or Deno required to use reducers? HOT 2
- [feature] Add ability to output selection when exiting HOT 6
- feat: toggle unescape strings HOT 2
- Bring back gradiant themes? HOT 1
- Panic error when invoked directly on Windows HOT 2
- Display http headers HOT 8
- Filter line-delimited or streaming JSON without slurping HOT 2
- About 32.0.0 release HOT 4
- Error when selecting field in command line on linux HOT 1
- Invalid content in clipboard after yanking key in wrapped mode
- No autocomplete in `zsh` when JSON doesn't end with a new line
- Any interest in implementing .[] in interactive mode? HOT 1
- Start in collapse mode
- conda-forge package
- Add support for multi-document YAML HOT 1
- Add `--slurp` and `--raw` to interactive mode HOT 1
- Wordy transformations cause `fx` to crash with piped data HOT 4
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 fx.