Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible? #51

Open
Bayramito opened this issue Jan 17, 2022 · 8 comments
Open

is it possible? #51

Bayramito opened this issue Jan 17, 2022 · 8 comments

Comments

@Bayramito
Copy link

Is it possible to use this on a react project where logs are realtime

@qiangyt
Copy link
Owner

qiangyt commented Jan 18, 2022

Hi @Bayramito ,

Do you mean send json log printed by javascript console.log() from browser to jog, or a totally-console.log-unrelated one which just send log from browser? Currently jog doesn't support that.

Here's what I'm thinking about it:

  1. Which brower javascript logging library should be supported (or should be tested at least)?
  2. Which environments expect to use this tool? Production environments, or developer/engineering environments?
  3. How to represent the processed log? In browser UI, console, or else?

Could you describe more detailed requirement? I will check the possibility to include it into incoming v2.0.

@Bayramito
Copy link
Author

Hi @Bayramito ,

Do you mean send json log printed by javascript console.log() from browser to jog, or a totally-console.log-unrelated one which just send log from browser? Currently jog doesn't support that.

Here's what I'm thinking about it:

  1. Which brower javascript logging library should be supported (or should be tested at least)?
  2. Which environments expect to use this tool? Production environments, or developer/engineering environments?
  3. How to represent the processed log? In browser UI, console, or else?

Could you describe more detailed requirement? I will check the possibility to include it into incoming v2.0.

I mean,

Lets say i have a react project and i run it by npm start right? And lets say i fetch data from a source and console.log(response) to check whats inside the data object.

So in iterm2 or a regular console application you are seeing it as a normal string right? I wonder is it possible to display it as a object structute with clickable handlers directly inside the console app.

Lets think you have a object printed out on your console app, and you can click to keys to expand them to see whats inside. And thats being realt rime. I mean you dont need to type jog x.log etc

@qiangyt
Copy link
Owner

qiangyt commented Jan 20, 2022

Lets say i have a react project and i run it by npm start right? And lets say i fetch data from a source and console.log(response) to check whats inside the data object.

So in iterm2 or a regular console application you are seeing it as a normal string right? I wonder is it possible to display it as a object structute with clickable handlers directly inside the console app.

Lets think you have a object printed out on your console app, and you can click to keys to expand them to see whats inside. And thats being realt rime. I mean you dont need to type jog x.log etc

Where the log is generated is still ambigious for me: as a react app, I think the console.log() writes to browser console, but you mentioned 'npm start' (a node.js backend app?) and 'iterm' which log is outputted to terminal instead of browser console. Which one?

@Bayramito
Copy link
Author

Bayramito commented Jan 20, 2022

Lets say i have a react project and i run it by npm start right? And lets say i fetch data from a source and console.log(response) to check whats inside the data object.
So in iterm2 or a regular console application you are seeing it as a normal string right? I wonder is it possible to display it as a object structute with clickable handlers directly inside the console app.
Lets think you have a object printed out on your console app, and you can click to keys to expand them to see whats inside. And thats being realt rime. I mean you dont need to type jog x.log etc

Where the log is generated is still ambigious for me: as a react app, I think the console.log() writes to browser console, but you mentioned 'npm start' (a node.js backend app?) and 'iterm' which log is outputted to terminal instead of browser console. Which one?

You see this log here ?

Ekran Resmi 2022-01-20 09 51 51

so its not readable at all as you can see.

what im doing is, i copy that and go to https://jsonformatter.curiousconcept.com/ to make it much more readable like so:

Ekran Resmi 2022-01-20 09 55 08

as you can see the result is much more readable, i can also narrow the objects as well as i can expand them by + icons. can this be done in my console?

@qiangyt
Copy link
Owner

qiangyt commented Jan 20, 2022

The pretty print could be doable by JSON.stringify(), for ex. https://stackoverflow.com/questions/4810841/pretty-print-json-using-javascript

The 'click-and-expand' is doable in terminal, but it sounds quite heavy for a terminal app. I'm working on jog 2.0 which has a web ui to view json log in real-time.

@Bayramito
Copy link
Author

The pretty print could be doable by JSON.stringify(), for ex. https://stackoverflow.com/questions/4810841/pretty-print-json-using-javascript

The 'click-and-expand' is doable in terminal, but it sounds quite heavy for a terminal app. I'm working on jog 2.0 which has a web ui to view json log in real-time.

sounds interesting...
any pre-release beta or something to test it out ?
personally im using the terminal for my react native project, and this web ui thing seemed to me like Safari's simulator debugger.

like this one,
Ekran Resmi 2022-01-20 12 16 03

its actually very powerful one but suddenly crashes when i restart my app

@qiangyt
Copy link
Owner

qiangyt commented Jan 20, 2022

sounds interesting... any pre-release beta or something to test it out ? personally im using the terminal for my react native project, and this web ui thing seemed to me like Safari's simulator debugger.

like this one,

Not yet have something testable, it's in early stage.
Before this discussion I didn't include the click-and-expand feature in 2.0 plan, but I like it and will do that now.

BTW, do you know any UI library that I can reuse it for click-and-expand json viewer?

@Bayramito
Copy link
Author

Bayramito commented Jan 20, 2022

sounds interesting... any pre-release beta or something to test it out ? personally im using the terminal for my react native project, and this web ui thing seemed to me like Safari's simulator debugger.
like this one,

Not yet have something testable, it's in early stage. Before this discussion I didn't include the click-and-expand feature in 2.0 plan, but I like it and will do that now.

BTW, do you know any UI library that I can reuse it for click-and-expand json viewer?

Nope, but found something like this

https://github.com/ddopson/underscore-cli

actually there are a lot of libs like this, but they work with files only. i mean you can use them for logging a specific file not on the fly while coding realtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants